Windows 2012 Task Manager vs Process Explorer, different CPU usage, why

process-explorerwindows-server-2012

We have a server with 4 Intel Xeon E5-4617 (6-core) CPUs. We are using it as a database server.

Windows 2012 task manager shows no cpu usage in 2 processors. Process Explorer shows CPU usage in all processors, but low CPU usage in 3 cores from the 4th processor.

Which one is correct?

Edit: Screenshots, using y-cruncher (multi-core Pi generator).

enter image description here
enter image description here
enter image description here

Best Answer

Which one is correct?

Both, probably.

Despite the impression you get from the graphs, resource usage is not polled continuously, but at discrete intervals, instead. So, what's happening here is that at one point in time, Task Manager polls the CPUs for usage, and gets its answer. Some number of milliseconds later, Process Explorer polls the CPU for usage and gets a slightly different answer back.

This makes sense, because it's polling at a slightly different time, and both measurements are probably accurate, just for slightly different intervals. We might not notice a time difference of 10 milliseconds, but it's a long time to computer - a 3.8Ghz processor can process 38 million operations in those 10 milliseconds that we can't even perceive. Here's a somewhat related ServerFault blog post on how polling intervals can lead you to erroneous conclusions.

In fact, it wouldn't surprise me if the the reason that Process Explorer is seeing minor activity that Task Manager isn't, is because Process Explorer is measuring the CPU usage generated by Task Explorer - the polling activity, related calculations and graphing aren't free, and consume CPU resources to process.

So, you've got two things going on here:

  1. You're measuring different intervals of time, which may be imperceptibly small to us, but are actually relatively long periods of time for a computer, in which a lot of activity can occur, generating different, accurate measurements.

  2. Measuring resources consumes resources, which may be detected by which ever application gets it data second. Much like the observer effect in quantum mechanics - the act of observing or measuring an event changes the event - the act of measuring your resource utilization utilizes the same resources you're trying to measure.

Related Topic