'How to locate the threads that cause high CPU usage?
I've inherited a multi-threaded .NET 4.61 Windows Service that's basically a service of services (or servlets). It has a core and a plugin architecture. You can write DLLs with classes that inherit from the base class, drop them into app directory and it will automatically run them. The DLLs are executed based on config file (so either on schedule, or external event like items in a Queue, etc..). There are hundreds of these DLLs that perform all sorts of tasks. And at any given point, there could be several dozens of them executing.
At some point, the servers started experiencing high CPU spikes (that last from 1 to 60 minutes) associated with this process. I took a memory dump with Sysinternals procdump and ran it through DebugDiag and didn't see anything obvious.
What can I do to improve discoverability as to which thread causes CPU spikes? Is there a way to catch whats going on through perfmon? Is there a way to tag threads so I know which servlet is running them?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
