Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One graph per CPU wrong #1967

Open
KyleKolander opened this issue Jan 21, 2024 · 5 comments
Open

One graph per CPU wrong #1967

KyleKolander opened this issue Jan 21, 2024 · 5 comments
Labels

Comments

@KyleKolander
Copy link

Brief description of your issue

Intel Core i9 14900K running multiple threads at relatively high load, which is reflected well in Windows Task Manager, but not in System Informer. I'm using the nightly build version 3.0.7429 on Windows 11 Pro 23H2 OS Build 22631.3007.

The total CPU utilization shows as 70% in TM but only 41.14% in SI. The obvious difference is by logical processor (32). Just eyeballing it, TM looks close to 70%, but SI's 32 graphs are nowhere near 41%. I tried resizing the window, closing and reopening the window, closing and reopening SI, but was met with the same result.

So it's three things:

  1. The total CPU utilization is way off (TM vs SI)
  2. The logical processor graphs are way off (TM vs SI)
  3. The logical processor graphs don't add up to the total CPU utilization (SI)

CPU_TaskManager_vs_SystemInformer

Steps to reproduce (optional)

Open System Informer and Task Manager at the same time (side by side) and set their CPU graphs to show logical processors. Run tasks that consume a lot of multithreaded CPU.

Expected behavior (optional)

  1. Total CPU utilization matches between TM and SI
  2. Logical CPU graphs match (at least close) between TM and SI
  3. Logical CPU graphs sum up to Total CPU utilization within SI

Actual behavior (optional)

No response

Environment (optional)

No response

@jxy-s
Copy link
Member

jxy-s commented Jan 21, 2024

Few things worth checking here:

  1. Try disabling Enable cycle-based CPU usage in SI.
  2. What is Process Explore reporting?
  3. What is Resource Monitor reporting?

It could be a discrepancy in the cycle-based CPU usage and efficiency cores. I'm not sure, I don't have access to that type of hardware to test myself. If it is, it's possible task manager if over-reporting the actual utilization of efficiency cores. This would become evident with 1 above. Hovering over one of the graphs in SI should report the core type. It's also possible the kernel's accounting of intel efficiency cores changed in the most recent versions of Windows. The observation here seems similar to the ARM cycle accounting.

@KyleKolander
Copy link
Author

I first ran a test with TM, SI, PE and RM (see screenshot). They're all over the place.

  • TM and RM are pretty close to one another - off by 5% total CPU utilization (which could be due to a slight sampling difference) and the logical processor graphs look very similar.
  • SI and PE have similar logical processor graphs, but their total CPU utilization isn't close at all - this seems like it would be a bug with PE, only 3.23% (but wait until later on).
  • SI/PE logical processor graphs aren't close at all to TM/RM.
  • SI/PE total CPU utilization isn't close to TM/RM.

CPU_TaskManager_vs_SystemInformer_vs_ProcessExplorer_vs_ResourceMonitor

Then I disabled Enable cycle-based CPU usage in SI (as you suggested) and re-ran the test. This caused SI to almost exactly mimic PE both WRT total CPU utilization and logical processor graphs. TM and RM stayed pretty much the same.

SI reports the first 16 logical processors as P-Core, and the last 16 as E-Core.

I will say that on the TM Details tab, if you sort by CPU, the total (excluding System Idle Process) does not add up to the total reported on the Performance tab (e.g., Performance tab reports 8%, but Details tab reports 3-5%). That being said, the Processes tab total for CPU does match the Performance tab. ha!

Which one is right? And why? Should I leave Enable cycle-based CPU usage disabled? It's important to understand CPU utilization...

I'm sure there's a good explanation for all of this, and my curious mind would very much like to know! :) I appreciate the help @jxy-s

@jxy-s
Copy link
Member

jxy-s commented Jan 22, 2024

I will say that on the TM Details tab, if you sort by CPU, the total (excluding System Idle Process) does not add up to the total reported on the Performance tab (e.g., Performance tab reports 8%, but Details tab reports 3-5%). That being said, the Processes tab total for CPU does match the Performance tab. ha!

Task Manager uses "Processor Utility" for reporting this information: https://learn.microsoft.com/en-us/troubleshoot/windows-client/performance/cpu-usage-exceeds-100

Which one is right? And why? Should I leave Enable cycle-based CPU usage disabled? It's important to understand CPU utilization...

This blog post will help add some color to the subject. It's focused on ARM but will help explain the option in detail. My advisement is to keep Enable cycle-based CPU usage on for more accurate reporting.

Then I disabled Enable cycle-based CPU usage in SI (as you suggested) and re-ran the test. This caused SI to almost exactly mimic PE both WRT total CPU utilization and logical processor graphs. TM and RM stayed pretty much the same.

If PE and SI are both reporting the same information (with cycle-based CPU usage off) it leads me to believe there is a problem with Task Manager. We regularly observe Task Manager reporting +/- 30% of what is should be (this is due to the "Processor Utility" linked above).

I only have access to a Windows 10 machine with Intel performance and efficiency cores. It's an older Intel CPU than your 14900K, but checking that machine shows consistent information for me. I checked the 10.0.22621.3007 kernel and I'm not immediately seeing any meaningful changes to the accounting of cycles or timing. This could be due to processor grouping, my mixed-core isn't configured to use processor groups, yours could be? System Informer is group-aware and Processor Explorer isn't.

To help diagnose this type of problem I often use CpuStres to stress targeted processors. It might be useful to run this experiment on your machine and see if the accounting is what you would expect. Using CpuStress you can set the ideal CPU and affinity to isolate the thread to a processor and apply a load to it. Once a load is applied you can check the reporting in the various tools to look for egregious inconsistencies.

@dmex
Copy link
Member

dmex commented Feb 13, 2024

  1. Task Manager reports "Processor Utility" on Windows 8, 10 and 11 which is completely different to processor utilization reported by Process Explorer and System Informer.
  2. TM and RM are both automatically launched with administrative privileges - Querying the cycle counters for some processes are restricted and you have to manually launch SI and PE with administrative privileges.
  3. Your processor has multiple processor groups and Process Explorer is unable to query multiple groups (E vs P).

https://aaron-margosis.medium.com/task-managers-cpu-numbers-are-all-but-meaningless-2d165b421e43

TM Details tab, if you sort by CPU, the total (excluding System Idle Process) does not add up to the total reported on the Performance tab

Task Managers details tab is the only remaining place where TM reports utilization.

@KyleKolander
Copy link
Author

Good lord... My head hurts after reading that. 😁 Thanks for the link. That helps to make more sense of it.

You guys are the experts (as far as I'm concerned). Given my CPU and OS, what tool/configuration/metric(s) should I use as the most accurate representation of how hard my system is working? I'm guessing you'll say System Informer, which is good, but how should I configure the options? And how should I interpret the results (e.g., on what scale)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants