VMware Cloud Community
hkannan
Contributor
Contributor
Jump to solution

can a VM cpu utilization go up because it moved to a under powered host?

Hi Performance gurus,

Can a VM cpu utilization go up because it moved to a under powered host?

Can this be resolved by adding another vCPU to the VM in the same (under powered machine)?

0 Kudos
1 Solution

Accepted Solutions
TomHowarth
Leadership
Leadership
Jump to solution

>hkannan wrote:

>Hi Performance gurus,

>Can a VM cpu utilization go up because it moved to a under powered host?

The simple answer to this is Yes, lets look at an analogy, we have a 5ltr bucket this is your CPU, you currently fill that bucket with 1ltr of water. The bucket also represents your Taskmanager display, it show average 25% usage.

Now you move that water to a 2ltr bucket and now your Taskmanager display will show 50% average usage.

>Can this be resolved by adding another vCPU to the VM in the same (under powered machine)?

You second question is more problematic, the simple addition of a second CPU may increase capacity by 50% however it will not decrease CPU usage by 50%, the OS and applications that are installed on that machine need to be SMP aware. this is true for both physical and virtual environments. Further for a virtual environment, if your host is overcommited that addition of a second vCPU could actually decrease performance for that guest, because it will be contesting for 2 free pCPU cores every time it issues an instruction from a SMP aware application or the OS.

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author on "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://www.amazon.co.uk/VMware-VSphere-Virtual-Infrastructure-Security/dp/0137158009/ref=sr_1_1?ie=UTF8&s=books&qid=1256146240&sr=1-1]".

Contributing author on "[VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410|http://www.amazon.co.uk/VMware-Certified-Professional-VSphere-Study/dp/0470569611]".

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410

View solution in original post

0 Kudos
5 Replies
weinstein5
Immortal
Immortal
Jump to solution

Welcome to the Forums - I assume when you say CPU utilization you are refering to CPU utilization as shown in the VM - if you are yes it can go up when a VM is moved to a host that is already having issues delivering CPU resources because what the CPU utilization is the amoint of cycles the VM is using that is being dleivered when migrated to a host with limited CPU resources the VM will receive fewer total CPU cycles and when measured inside the VM it will show a higher CPU utiliztion -Adding another vCPU will only make things worse since the host is already constrained by CPU -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
AntonVZhbankov
Immortal
Immortal
Jump to solution

>Can a VM cpu utilization go up because it moved to a under powered host?

Yes. Let's suppose that your VM really needs CPU, doesn't depend on disk I/O and has 50% load on 3GHz CPU.

If you migrate this VM to CPU with 2 GHz speed, from the same family, VM will take the same computing power to work = more CPU time.

3 GHz * 50% = 1.5 GHz

1.5 GHz / 2 GHz = 75% load on new 2 GHz CPU

But this relates only to CPU-consuming VMs. If your VM mainly waits for I/O then there would not be such dependency on CPU clock. I have VM with Nagios monitoring system. It consumed 50% CPU average on Xeon 5365 with 3GHz, but after I moved it to Xeon 5570 with 2.93 GHz I noticed that CPU load dropped to 25% instead of going up for a couple percents.

Adding another vCPU doesn't always help. Actually it will help only if you application can work with multiple CPUs, or you have multiple instances and multiple running services in VM. In many cases another vCPU doesn't make any difference, and in some case it can ever worse situation.


---

MCSA, MCTS Hyper-V, VCP 3/4, VMware vExpert

http://blog.vadmin.ru

EMCCAe, HPE ASE, MCITP: SA+VA, VCP 3/4/5, VMware vExpert XO (14 stars)
VMUG Russia Leader
http://t.me/beerpanda
TomHowarth
Leadership
Leadership
Jump to solution

>hkannan wrote:

>Hi Performance gurus,

>Can a VM cpu utilization go up because it moved to a under powered host?

The simple answer to this is Yes, lets look at an analogy, we have a 5ltr bucket this is your CPU, you currently fill that bucket with 1ltr of water. The bucket also represents your Taskmanager display, it show average 25% usage.

Now you move that water to a 2ltr bucket and now your Taskmanager display will show 50% average usage.

>Can this be resolved by adding another vCPU to the VM in the same (under powered machine)?

You second question is more problematic, the simple addition of a second CPU may increase capacity by 50% however it will not decrease CPU usage by 50%, the OS and applications that are installed on that machine need to be SMP aware. this is true for both physical and virtual environments. Further for a virtual environment, if your host is overcommited that addition of a second vCPU could actually decrease performance for that guest, because it will be contesting for 2 free pCPU cores every time it issues an instruction from a SMP aware application or the OS.

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author on "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://www.amazon.co.uk/VMware-VSphere-Virtual-Infrastructure-Security/dp/0137158009/ref=sr_1_1?ie=UTF8&s=books&qid=1256146240&sr=1-1]".

Contributing author on "[VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410|http://www.amazon.co.uk/VMware-Certified-Professional-VSphere-Study/dp/0470569611]".

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
hkannan
Contributor
Contributor
Jump to solution

Thanks all for your responses. To make sure I understood, I wish to summarize the previous responses

Can a VM cpu utilization go up because it moved to a under powered host?

The answer is yes

Can this be resolved by adding another vCPU to the VM in the same (under

powered machine)?

As far as this particular guest is concerned, the answer is "it probably can, but not always". But I also understand that it will in many cases make the problem worse, especially for the other VMs

0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

That is the long and short of it yes :smileygrin:

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author on "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://www.amazon.co.uk/VMware-VSphere-Virtual-Infrastructure-Security/dp/0137158009/ref=sr_1_1?ie=UTF8&s=books&qid=1256146240&sr=1-1]”.

Contributing author on "[VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410|http://www.amazon.co.uk/VMware-Certified-Professional-VSphere-Study/dp/0470569611]”.

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos