Understanding CPU Load

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,413
Reaction score
7,522
Location
Bellville
I would like to understand CPU load as it relates to sizing and optimizing servers.

#1 Is this correct?

If a VM is reporting 50% CPU average, but the physical hypervisor has a low-end processor, and I move this VM to a much faster hypervisor, the average % CPU is going to drop. The VM % therefore is based upon the underlying performance of the hypervisor?

#2 So, then, how does one determine the true workload of a VM?
 
Answers:

1) Yes, Sort of...

CPU usage depends on a couple of different things, disk IO actually being one of them.
If for example you at 50% usage on a raid1 SATA setup and you simply move to another hypervisor with the same processor/ram except just a raid10 SATA or even SSD, there will be less IO waits, so your CPU usage will be lower.

Your CPU usage is affected by:
- The hypervisor's underlying hardware as a whole.
- The number of VM's on the Hypervisor.
- How resource intensive the other VM's are on the hypervisor.

For a VM, your biggest issues are going to be Disk IO and IO waits, this will affect your CPU percentage.

You can run things like:

# iotop --only

# iostat (look for the %iowait value)

2) Very difficult.

For example, we have a customer who was on a Dual E5620 server with 2x 1TB SATA (Raid 1) and 16GB RAM Dedicated Server, running cpanel and was constantly at a load average of about 8.00 - 15.00, we migrated him to our cloud and this is his current output:
------------
# uptime
13:23:18 up 159 days, 19:12, 2 users, load average: 0.63, 0.47, 0.38
------------

It's very difficult to determine the true work load and it is very much hardware dependent.
 
3d074ddc78.png



Windows X with 2 allocated CPU's
 
#2. Set up performance counters against Hypervisor Logical and Hypervisor Virtual Processors.

#1. Not always. Processor load is determined by processes handled, not so much how quickly they get handled. At 50% usage, chances are you're not experiencing any queuing or parallelism, and if you really, really wanted to boost performance, I add an additional core/thread/vCPU to the VM, but chances are you won't even notice the difference until you start processing closer to 100%.

Higher clock speed doesn't always translate to higher performance as far as virtualization is concerned.

I'm busy testing this right now though to see if I can back up my babble :)
 
As I suspected. There is no bearing on the clock speed of the host as far as the VM performance/CPU load is concerned.

Test scenario:

Virtual server with 2 x vCPU and 32GB vRAM

Cluster Host CPU: Intel Xeon-based @ 2.4Ghz
Average VM CPU usage over a 12-hour period under normal load: 37%

Cluster Host CPU: Intel Xeon-based @ 3.0Hgz
Average VM CPU usage over a 12-hour period under normal load: 36%

So yeah, one percent difference, hardly worth writing home about, and likely has nothing to do with the host CPU speed.

Stats based on Solarwinds monitoring.
 
As I suspected. There is no bearing on the clock speed of the host as far as the VM performance/CPU load is concerned.

Test scenario:

Virtual server with 2 x vCPU and 32GB vRAM

Cluster Host CPU: Intel Xeon-based @ 2.4Ghz
Average VM CPU usage over a 12-hour period under normal load: 37%

Cluster Host CPU: Intel Xeon-based @ 3.0Hgz
Average VM CPU usage over a 12-hour period under normal load: 36%

So yeah, one percent difference, hardly worth writing home about, and likely has nothing to do with the host CPU speed.

Stats based on Solarwinds monitoring.

Thank you so much for the help.



Also the rest of you I deeply appreciate it.
 
As I suspected. There is no bearing on the clock speed of the host as far as the VM performance/CPU load is concerned.

Test scenario:

Virtual server with 2 x vCPU and 32GB vRAM

Cluster Host CPU: Intel Xeon-based @ 2.4Ghz
Average VM CPU usage over a 12-hour period under normal load: 37%

Cluster Host CPU: Intel Xeon-based @ 3.0Hgz
Average VM CPU usage over a 12-hour period under normal load: 36%

So yeah, one percent difference, hardly worth writing home about, and likely has nothing to do with the host CPU speed.

Stats based on Solarwinds monitoring.

Clock speed has little bearing when it comes to hypervisors.

When we ran sysbench testing on our side, we found that on a E5-1620v2 (3.70Ghz) it completed in 22 seconds,
When we did the same test on a single E5-2630v2 (2.5Ghz) it completed in 12 seconds.

Clock speeds only play a part in certain single threaded processes. The moment multi-threading is concerned (kvm/xen/etc) work horse type processes like the E5-26xx really start to shine.
 
Top
Sign up to the MyBroadband newsletter
X