Saturday, January 28, 2017

performance - How do I analyze excessive Windows kernel mode CPU usage?

My Windows XP machine recently started to semi freeze on me every odd reboot after a few minutes of usage (different programs / no additional prg start at all).




Update: I have now managed to get a bit more detail with Process Explorer. This is a 2 core CPU and the 100% kernel usage is only on one core. The process list shows DPCs - Deferred Procedure Calls at 50% (that's 100% on one core). So the question is now: **What's DPC and how do I fix them??




Next update: OKIES ... using this and that I have been able to get xperf running on my Windows XP, and the sample dumps I took display just fine on my Win7 laptop.Yes, you need a Win7/Vista computer to view the dumps taken on Windows XP. However, I am now facing the following problem, I can enable xperf tracing, xperf -on Latency and the problem now also reoccurred while xperf tracing was on, but as soon as my DPC goes to 100%, Windows doesn't start any new processes (or their startup never finishes) (an open e.g. cmd window remains responsive just fine, but every exe you try too call just hangs (dir works just fine because that a cmd command) -- I can only assume that CreateProcess hangs with some part of the kernel). Now, not being able to launch any new process means that I cannot run xperf -d dumpfile.etl, because, when I enter that on the cmd window, it just hangs.


So it seems I'm out of luck here. I would rather throw out the whole rig than start manually disabling drivers ... :-)


Any other ideas appreciated!




That is, while Windows remained responsive theoretically (e.g. Mouse Cursor moved normally and I could click, and the click was eventually recognized) actions taken by the user were only responded to after minutes (literally).


Example: Hitting the Num-lock key on the keyboard normally toggles the Num-lock LED on the keyboard. This also is the case with my semi-frozen machine, but only after a minute or two.


One time, I managed to launch Process Explorer and, after a few minutes, the System information graph clearly indicated 100% CPU usage on the red line (kernel mode) and the green line stayed on zero. In this state, though the graph was still updated on screen, the machine could not be operated anymore. (Well, unless you are willing to wait for a few minutes after every click.)


So, now I'm wondering what the problem could be, as I did not install anything new on this machine for weeks, certainly not prior to seeing this behavior. (Rebooting helps sometimes, sometime I need a second or third reboot before the machine becomes usable for a longer period of time.)


Now, how can I find out what is actually causing the excessive kernel mode usage?




Note: Also posted this in the sysinternals forums.

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...