Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 919753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:35:53+00:00 2026-05-15T18:35:53+00:00

Greetings. I have a .NET application running a bunch of simulations in parallel. It’s

  • 0

Greetings.

I have a .NET application running a bunch of simulations in parallel. It’s doing a parameter sweep, so each parameter has its own Parallel.Foreach loop. I normally set the max parallelism to one in all but one of loops, to keep memory requirements down, since each parameter can take more values than I have cores available (4).

The application is totally CPU bound, and only does I/O at the end, to write out results. I only have one lock around the data structure capturing the results, but that is accessed very seldom (once every few seconds). No matter how far I push the parallelism (by controlling the max parallelism on the loops) I always get an average CPU usage of about 50% (~ 2 cores).

I’d like to find out what prevents a higher CPU usage. My guesses are: 1) some call to .NET libraries that are synchronised, thus serialising the calls. 2) The GC stepping in to clean up resources (there’s a lot garbage being produced by the application).

Any ideas how to go about the investigation?

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:35:53+00:00Added an answer on May 15, 2026 at 6:35 pm

    I think debugging of multithreading issues always requires knowledge about code details, so there is not general recipe. But I think the GC is a very good first guess. Have you already tried this one:

    http://msdn.microsoft.com/en-us/library/ms229357.aspx

    I had a similar problem and using gcServer has allowed it to push the CPUs (8 cores) to it’s limits.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings! I'm doing a Form on ASP.NET MVC 2, in my view I have
Greetings, We have an application written in .net 3.5 that uses wcf and also
Greetings, I have an asp.net mvc application. I have some links that corresponds to
Greetings! I inherited a C#.NET application I have been extending and improving for a
Greetings, in my asp.net mvc application I have a listbox rendered as follows: <%=
Greetings, I have an application that allows users to import libraries (.NET DLLs) they've
Greetings, I have asp.net check box control and asp.net dropdownlist control inside div tag.
greetings all i have a web application using (spring-hibernate) frameworks and when tried to
Greetings, I have a large .Net web app which runs on a farm of
Greetings, I have a view based application project where I have created an NSObject

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.