CPU utilization plays a vital role in the performance of your application. When it comes to web applications which are expected to run round the clock, the impact caused by a CPU spike will be catastrophic as the responsiveness of the application will get worse when there are not enough CPU resources to consume.
There are so many tools which were used to perform the high CPU troubleshooting.
For most of the high CPU problems we would need to capture a memory dump to get to the bottom of the issue,the most conventional way to capture a memory dump would be to manually trigger a dump using one of the many available tools during the exact time of issue. But there are times where it will not be feasible for us to manually trigger a Memory dump at the issue time. For example, the issue might happen during night time where no one will be around to capture the data. For such kind of Scenarios Automated way of capturing Data is always good. In this article I will walk you through one of such automated ways.
Steps for capturing High CPU Automated Dumps Using Perfview Command
Then Use the below command:
Perfview /NoGui collect "/StopOnPerfCounter=Process:% Processor Time:w3wp>25" -ThreadTime -CircularMB:1000 -CollectMultiple:5 –accepteula
Here 25 is the threshold value which show the CPU consumption by w3wp in %.And also this value can vary.
Example : If you're seeing 80% to 90% CPU utilization by w3wp.exe then this threshold value would be 80.
Then the command will be:
Perfview /NoGui collect "/StopOnPerfCounter=Process:% Processor Time:w3wp# >25" -ThreadTime -CircularMB:1000 -CollectMultiple:5 –accepteula
So here we are dealing with w3wp# . What is # here? how to get it, let's see this is below steps.
So here the w3wp# value would be w3wp#2. And now our command would be like this.
Perfview /NoGui collect "/StopOnPerfCounter=Process:% Processor Time:w3wp#2>75" -ThreadTime -CircularMB:1000 -CollectMultiple:5 –accepteula
Author: Priyanka Pillai (prpillai)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.