Everyone uses %CPU to measure performance, but everyone is wrongBrendan Gregg, senior performance architect at Netflix
This is an opportunity for us to revisit what we have been pushing for a long time: How to measure performance and resource consumption reliably?
Brendan Gregg explains that the CPU rate can indicate false information. For instance, a busy CPU doesn’t necessarily indicate that the CPU is busy doing calculations but is waiting for information. It’s therefore necessary to use more advanced tools to analyze what happens in the lower layers of the code. Brendan Gregg even concludes that this problem will get worse with the acceleration of processor speed.
We have observed this phenomenon through our R&D. Indeed, a high CPU rate doesn’t necessarily mean that the CPU is requested and conversely a low CPU could hide overconsumption from another cache.
The problem is even more present in mobility. Indeed, the current platforms are heterogeneous: CPU, GPU, Radio, multiple interfaces… It’s therefore complex to follow the current performance of these platforms and it’s necessary to use various and complex profiling tools.
Our approach at Greenspector is different, we propose to use energy as a more reliable metric. Any component solicited consumes energy, monitoring energy consumption will detect over-consumption of resources.
For more information, we invite you to read our article Why you should measure the energy consumption of your software?.
Receive our newsletter every two months with a selection of our best articles dedicated to applications efficiency.