CPU Utilization Is Wrong on PCs, and Getting Worse Every Year

CPU Utilization Is Wrong on PCs, and Getting Worse Every Year

CPU utilization is wrong. That’s the argument Brandon Gregg, Netflix’s senior performance architect, has leveled against one of the most fundamental performance measurement tools we use when evaluating a system. According to Gregg, CPU utilization as reported by Windows isn’t just wrong — it’s actively getting worse over time.

If you’ve ever dug into this topic, you’re aware of some of the ways that CPU utilization isn’t reported accurately. Ever since Intel (and now AMD) added Hyper-Threading / SMT support, there’s been a discrepancy between how cores are presented in Task Manager and what resources are actually available. Windows, Linux, and other operating systems report the total number of cores and measure CPU utilization as if each logical core was actually a physical core. But that’s not the problem Gregg is discussing. First, there’s the problem of thread stalling. If you see your CPU running at 90 percent load, you might think it looks like this:

CPU Utilization Is Wrong on PCs, and Getting Worse Every Year

In reality, Gregg points out, what might be going on is something akin to this, in which the CPU is stalled and waiting for data but isn’t actually doing any work.

CPU Utilization Is Wrong on PCs, and Getting Worse Every Year

If you think about it, you’ve probably seen this in action. If you’ve ever performed a rendering or Photoshop manipulation that really tasked your CPU, performance — even UI performance — may slow to a crawl while the workload is executing. There are ways to avoid this problem by setting the total number of active threads or the priority of the workload itself, but if you’ve worked with computers for any length of time you’ve probably seen instances where 100 percent CPU utilization didn’t actually mean 100 percent CPU utilization. The problem, according to Gregg, is that memory accesses often slow the system. This is known as the CPU-DRAM gap, and it’s a topic we’ve discussed before at ET.

CPU Utilization Is Wrong on PCs, and Getting Worse Every Year

The entire reason we implemented advanced caching structures with L1, L2, and L3 cache is precisely because the DRAM gap stalls out CPUs and lowers overall performance. But now, there’s another problem causing issues for CPU utilization: Spectre and Meltdown patches.

In the video above, Gregg walks through a case example of two modern servers that were turning in very different performance figures for the same workload, despite running at the same clock and performing exactly the same tasks. The culprit? Spectre and Meltdown patches that flush the TLB caches, causing stall cycles in the CPU. Gregg goes into much more detail on how the KPTI patches can impact performance in a blog post on the topic, and while the data he presents is specific to the workloads he’s running (as one would expect), the impact is considerable.

But the takeaway is this: CPU utilization, as reported by Windows, is often incorrect. All too often, what looks like CPU usage is actually a stalled CPU waiting to do something useful.

Continue reading

Nvidia GeForce RTX 3060 Ti Launches Dec. 2, but Good Luck Getting One
Nvidia GeForce RTX 3060 Ti Launches Dec. 2, but Good Luck Getting One

The RTX 3060 Ti goes on sale tomorrow for a mere $399—it might even be affordable after the obscene reseller markup!

Terraria Dev Cancels Stadia Version After Getting Locked Out of Google Account
Terraria Dev Cancels Stadia Version After Getting Locked Out of Google Account

Re-Logic co-founder Andrew Spinks says Google has banned his account, locking him out of thousands worth of dollars in content. His response is to cancel Terraria for Stadia.

Starlink Is Already Getting Close to Wired Broadband Speeds
Starlink Is Already Getting Close to Wired Broadband Speeds

According to the latest data from Ookla Speedtest, Starlink has seen substantial speed improvements that put it close to wired broadband. It's even managed this while increasing subscriber counts by more than 25 percent.

Best Buy Is Getting a Huge Nvidia RTX GPU Restock Tomorrow
Best Buy Is Getting a Huge Nvidia RTX GPU Restock Tomorrow

Dozens of Best Buy stores in the US are getting restocks of the RTX 3090, RTX 3080 Ti, RTX 3080, RTX 3070 Ti, RTX 3070, and RTX 3060 Ti. However, you'll have to get an early start to the day.