Metric Extension : CPU usage and capacity planning

CPU usage is one of the KPIs usually used for capacity planning, it’s supposed to allow us to determine the remaining available capacity. But with hyper-threading enabled things can become much more complicated as the Linux operating system assumes that all threads are equal and thus overstates the CPU capacity. So the CPU usage may be wrongly interpreted if we don’t take into account that !

There is many great articles talking about that such as https://blog.pythian.com/cpu-utilization-not-useful-metric/ by Jared Still.

Basically the benefit of hyper-threading depend heavy on the workload and based on that we can usually calculate a “metric adjustment %” as explained in the previous articles or as in this one https://www.oracle.com/technetwork/database/availability/exadata-database-machine-kpis-3224944.pdf

Based on that we can calculate the real/actual utilization

Example extracted from the previous article :

Capture 01

“Actual utilization gives an approximate measure of how much CPU is really used so that available capacity can be determined”

And then what ? .. Build a Metric Extension based on that formula for example (such as on my previous blog post) :

  • For CPU utilization less than 50%, multiply by 1.7.
  • For CPU utilization over 50%, assume 85% plus (util-50%)* 0.3.

*This formula are extracted from the previous article also .

Or just build a custom report based on “MGMT$METRIC_HOURLY” (WHERE metric_column= ‘cpuUtil’) table for example and then adjust the metric accordingly.

That’s it 😀

One thought on “Metric Extension : CPU usage and capacity planning

Leave a comment