0 out of 1 rated this helpful - Rate this topic

High CPU usage and .NET thread pool

Lync 2013

If you experience unusually high CPU usage or an increase of CPU usage over time, it may be related to a known issue in the common language runtime (CLR) thread pool in .NET Framework 3.5 SP1.

Profile the application to find where the process time is spent. If significant time is spent in lock contention methods inside the CLR thread pool, you are likely affected by this issue.

Alternatively, connect the debugger to the process (or load a dump of the process into the debugger) and run the !threadpool command from the sos.dll extension DLL. If the queue length is very low (0, 1, or 2), but the total number of worker threads is equal to or very close to Max Limit of worker threads, your application is very likely affected by this issue.

Limit the maximum number of worker threads in the thread pool by calling ThreadPool.SetMaxThreads. The number used should reflect the application's needs, and can vary from application to application.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.