3 ms·
> Boy, what a useless measure. The article makes the perfectly-reasonable observation that "CPU usage" also includes the time spent waiting on memory, that thi
by wzdd 9y ago
> Boy, what a useless measure.
The article makes the perfectly-reasonable observation that "CPU usage" also includes the time spent waiting on memory, that this time (as a %) has increased significantly in modern processors, and that visibility into stall time is potentially actionable to increase efficiency. It's useful to think about the continued relevance of performance metrics which were introduced in the 1970s and have continued basically unchanged into 2017. The article does not claim that "CPU usage", as a metric, is useless. Your comment is satirising a strawman.
- kazinator 9y agoIt isn't called useless, just "misleading" and "wrong". How useful is something if it is both? If I have two programs which scan through a 100 Gb file to do the same processing, and both take the same amount of time (the task is I/O bound), which is more efficient? Let's see: one uses 70% CPU, the other 5%: clear. How is that wrong; where are we misled? This is simply telling us that although the elapsed wall time is the same, one program is taking longer. We could look at the processor time instead of the percentage: that's just a rearrangement of the same figures. That 70% is just the 0.7 factor between the processor time and real time. It is the article that is fighting a strawman because nobody uses raw CPU time or utilization to measure how well a program execution is using the internal resources of the processor. I have never seen anyone claim, based only on processor time alone and nothing else, that a program which takes longer to do the same thing as another one is due to a specific cause, like caches being cold, or a poorer algorithm. That person would be misled and wrong, not CPU time per se.
- scott_s 9y agobrendangregg is clearly trying to educate people who may not be aware of the difference between "CPU is busy" and "CPU is doing useful work." You already know this, and that's okay! You're not the target audience. I concede his title was slightly on the side of "I'm going to say something simple and catchy, then walk it back a bit with a nuanced explanation", but I'm willing to give him slack considering his numerous (http://www.brendangregg.com/portfolio.html http://www.brendangregg.com/portfolio.html) contributions to the literature for analyzing systems performance.