Sysinternals Homepage
Forum Home Forum Home > Sysinternals Utilities > Process Explorer
  New Posts New Posts RSS Feed - Several .NET threads are busy and two of them have
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Several .NET threads are busy and two of them have

 Post Reply Post Reply
darkthread View Drop Down

Joined: 02 March 2018
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote darkthread Quote  Post ReplyReply Direct Link To This Post Topic: Several .NET threads are busy and two of them have
    Posted: 02 March 2018 at 1:32am
One of our ASP.NET web servers occasionally goes CPU high with a series of peaks.

Using process explorer, we found something weird: the web application process contains 120-150 threads. While CPU usage is high, there are about 10 busy threads and two of them having very high context switch delta. (more than 7000 context switches per second)

Based on my little knowledge, heavy context switch is often caused by large amount of parallel threads. 150 threads are not many, 8 threads are busy and only two of them have high context switch, it's quite strange to us. The web is just slow and no exception or error log left, so we have no clue what's wrong.

Is there any possible scenario (race condition, resource locking... ) can cause such result? What kind of data should I monitor to collect more information in this case?

Back to Top
MagicAndre1981 View Drop Down
Moderator Group
Moderator Group

Joined: 08 January 2007
Location: Germany
Status: Offline
Points: 3481
Post Options Post Options   Thanks (1) Thanks(1)   Quote MagicAndre1981 Quote  Post ReplyReply Direct Link To This Post Posted: 11 March 2018 at 9:05am
use ETW to capture and analyze the issue. Install Windows Performance Toolkit (part of Windows 10 SDK)

Open cmd.exe as admin, run wpr.exe -start CPU && timeout -1 && wpr.exe -stop C:\HighCPUUsage.etl, minimize CMD, capture the CPU usage/hang, go back to CMD and press a key to stop logging.

Now analyze the ETL for high CP usage:

or hang:
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.06
Copyright ©2001-2016 Web Wiz Ltd.