Skip to content

Parallelism: trouble saturating CPU when making predictions #6702

Closed

Description

@torronen

System Information (please complete the following information):

  • OS & Version: Windows Server 2019
  • ML.NET Version: ML.NET 1.6.
  • .NET Version: .NET 7.0

Describe the bug
I run prediction in Parallel.ForEach loop on 16 core machine. The CPU consumption usually stabilizes near 10-12% even is max parallelism would be 16.

I would like to understand what is might be the bottleneck. Are there some parts of Microsoft.ML that may be limiting, such as locks(?) or parallel data structures that do it internally?

Memory hard Faults usually <10, max < 100. I am caching models and dataset, about 90% RAM used. Disk 0-20% Highest active time.

Activity

  1. ghost added
    untriagedNew issue has not been triaged
    on May 21, 2023
  2. dotnet-policy-service commented on Aug 27, 2026

    @dotnet-policy-service
    Contributor

    This issue has been marked needs-author-action and may be missing some important information.

  3. rosebyte commented on Aug 27, 2026

    @rosebyte
    Member

    Triage: could you please provide more information so we can successfully reproduce the situation?

  4. added
    area-CoreCore ML.NET APIs and shared functionality
    on Sep 8, 2026
  5. torronen commented on Sep 25, 2026

    @torronen
    ContributorAuthor

    @rosebyte Sorry, it has been a while since I experienced this issue, so I suggest we close this issue. Based on my current knowledge I expect it could have been a GC configuration issue, not ML.NET issue.

  6. locked and limited conversation to collaborators on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CoreCore ML.NET APIs and shared functionalitygreendevelopmentneeds-author-actionMore information or action is needed from the author

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions