VMware Cloud Community
jbhifi
Contributor
Contributor
Jump to solution

Question about CPU Ready Time %

Hello Vmware experts.

Quick question regarding cpu ready time in esxtop. I have a couple of VM's which have been assigned 4 vCPU's. When viewing their stats in esxtop they show the highest CPU ready time. I was wondering if this figure is the result of adding the ready time from each vCPU together ? For example, a 4 x vCPU VM with ready time of 10 %, does this really mean 2.5 % per vCPU? Should I be concerned by ready time of 10%? I've been reading that assigning multiple vCPU's unnecessarily can cause high CPU ready time. How do others decide on how many vCPU's they should assign to there VM's ?

Ok, just realised that was more than a quick question....... anyway, would be great if someone could make all this a little clearer for me.

Thanks,

BTW, my hosts CPU utilization sit at an average of 25%.

Reply
0 Kudos
1 Solution

Accepted Solutions
mittim12
Immortal
Immortal
Jump to solution

In vSphere they have relaxed the co scheduling of multiple vCPU even more so that only the vCPU that has gotten ahead of the rest is stopped. Still it's best practice to start with a singole vCPU and work your way up if needed.

In esxtop you can use the e command to expand the CPU statistics. In multiple vCPU machines this will allow you to see the read time of each CPU (which should add up to what you were seeing earlier) and it will also allow you to see the %used for each CPU. This should allow you to see if both vCPU are being properly used in a multi vCPU box. I'd also watch %CSTP field which is the co stop and will give you an indiciation of how often vCPU on the machine are being stopped to allow the other CPU to keep up.

Great pdf on the CPU scheduler in vSPhere can be found here http://www.vmware.com/files/pdf/perf-vsphere-cpu_scheduler.pdf






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

Twitter: http://twitter.com/mittim12

View solution in original post

Reply
0 Kudos
6 Replies
NuggetGTR
VMware Employee
VMware Employee
Jump to solution

ok yes you will see high cpu ready time the more vcpus you have(if there is more than itself on the host)

This is because if you assign 4 vcpu's and say something that needs to run on the virtual machine requires 1 thread, it has to wait until 4 threads are available at the same time before it is run, so if you have 2 vcpu's the system needs 2 available threads even tho it only requires 1. so when this is added with extra virtual machines on the host it takes longer to find 2 or 4 cpu cycles to run at the same time then it does for just one.

Im having problems with clients at the moment wanting ever machine to have 4 or 8 cpus cause they assume its going to be better, then in real world testing their in house application(s) ran worse with 4 than they did with 2 as it could only use 2 threads.

Now i did hear somewhere that this is not 100% the case anymore and there has been improvements but from what ive seen it still looks like the case.

Now cpu ready is really relative to what its applied to depending on the application 10% cpu ready may not impact negativity on the virtual machines performance. like web servers or small but high transaction type servers would be affected as ever ms they wait is requests it could be filling, but machines doing large non frequent possessing or something like cpu ready time wont impact it greatly.

hope i explained that ok.........

________________________________________ Blog: http://virtualiseme.net.au VCDX #201 Author of Mastering vRealize Operations Manager
ThompsG
Virtuoso
Virtuoso
Jump to solution

Hi,

Not a VMware expert here, just trying to help Smiley Happy

Yes you are correct - when looking in esxtop the figure is the sum of the ready time across all 4 vCPUs.

In regards to when you should be concerned there is a generally accepted value of being concerned with any figure over 10% for the VM. This document says it much better than I could here: http://communities.vmware.com/docs/DOC-7390

Not sure how others determine how many vCPUs to assign to a VM but I start all VMs with 1 vCPU. It will quickly become apparent if the application requires more than one vCPU in which case I scale up the processors or scale out the application. Obviously if you are migrating a workload to a VM (say from physical) then you can do a perfmon before migration to estimate how many vCPU's to start with.

Trust this helps.

mittim12
Immortal
Immortal
Jump to solution

In vSphere they have relaxed the co scheduling of multiple vCPU even more so that only the vCPU that has gotten ahead of the rest is stopped. Still it's best practice to start with a singole vCPU and work your way up if needed.

In esxtop you can use the e command to expand the CPU statistics. In multiple vCPU machines this will allow you to see the read time of each CPU (which should add up to what you were seeing earlier) and it will also allow you to see the %used for each CPU. This should allow you to see if both vCPU are being properly used in a multi vCPU box. I'd also watch %CSTP field which is the co stop and will give you an indiciation of how often vCPU on the machine are being stopped to allow the other CPU to keep up.

Great pdf on the CPU scheduler in vSPhere can be found here http://www.vmware.com/files/pdf/perf-vsphere-cpu_scheduler.pdf






If you found this or any other post helpful please consider the use of the Helpful/Correct buttons to award points

Twitter: http://twitter.com/mittim12

Reply
0 Kudos
jbhifi
Contributor
Contributor
Jump to solution

Guys.

Thanks alot for these answers. Very helpful. Just one thing regarding the total ready time for a multi vCPU VM. As a couple of you have stated, the ready time of a multi vCPU VM is the sum of all vCPU's ready time. So if 5% CPU ready time is about as high as you want to go, should I use the total of all vCPU's or pay more attention to the single vCPU ready time.

Thanks.

Reply
0 Kudos
ThompsG
Virtuoso
Virtuoso
Jump to solution

Hi,

Not 100% sure what you are asking here so sorry if I'm off topic. I tend to look at the individual ready times of the various vms rather than the total. It is possible to have a vm waiting for CPU while others are fine. This is especially true of multiprocessor vms so look at each vms ready time in a case by case basis. If I have a vm that is suffering due to high ready time then I take the others into context to see what might be causing it.

Not sure if this helps.

Reply
0 Kudos
depping
Leadership
Leadership
Jump to solution

Agreed, with esxtop you can expand (break up) a world by pressing "e". this way you can see %RDY per vCPU instead of for the full world. For more details on esxtop: http://www.yellow-bricks.com/esxtop/

Duncan

VMware Communities User Moderator | VCDX

-


Soon to be release: vSphere 4.1 HA and DRS deepdive (end of November through Amazon.com)

Blogging: | Twitter:

Reply
0 Kudos