VMware Cloud Community
fromet
Contributor
Contributor
Jump to solution

High CPU usage

Hi,

I'm new in this vmware world. We are using vSphere Client 4

We have a host machine (2 chips with 6 CPUs (2.4 mhz) and hyperthreading=>24 rcpu ) with 2 vm running asterisk where CentOS is th OS.

One of the VM is showing high CPU usage, it was configured with 4 vCPUs and 9575 MHz, memory 7396 MB. I tried to increase the amount of vCPUs but I read this warning: "changing the number of CPUs after OS installed may make vm unstable".

So what I did was:

adding more shares in CPU (from 4000 to 6000) and adding reservation: 9572 Mhz.

After that I saw a change in the perfomance graph, (I attached the figure). 

Are that actions solve my problems? Do I have to add more vCPUs anyway?

If I add more vCPUs will I have a problem with my VM?

Regards,

Rafael

Reply
0 Kudos
1 Solution

Accepted Solutions
ThompsG
Virtuoso
Virtuoso
Jump to solution

If I'm reading your attachment correctly this VM has a reservation of 9.57Ghz but is NOT limiting the CPU cycles it can consume therefore you will be able to utilize all the CPU available to it, i.e. 10.52 GHz

One other thing to note: depending on your vSphere licensing you may not be able to add additonal vCPU to this VM. ESX(i) 4 is limited to 4 with Enterprise licensing - 8 with Enterprise Plus.

Kind regards.

View solution in original post

Reply
0 Kudos
7 Replies
rickardnobel
Champion
Champion
Jump to solution

fromet wrote:

So what I did was:

adding more shares in CPU (from 4000 to 6000) and adding reservation: 9572 Mhz.

After that I saw a change in the perfomance graph, (I attached the figure). 

Are that actions solve my problems?

The Shares and Reservations will only matter (in this case) if you have a very high total demand of CPU in your host. If you do not have a overcommit in CPU demand then it will not help you.

For this VM, does it make sense that it should consume 100% CPU, in the sense as if the applications running inside has this kind of high CPU usage? If not, then you should begin by investigate if something is wrong inside the VM guest configuration.

Do I have to add more vCPUs anyway?

If your VM application really needs lots of CPU to work well then you could add more vCPUs and it should give the VM better CPU performance, but only do it if you think it is reasonable for the VM to behave like that.

If I add more vCPUs will I have a problem with my VM?

Being no Linux expert I am not 100% sure, but if you just shut the VM down and increase the vCPUs it should be fine. The warning of the VM being unstable is mostly from the old Windows NT and 2000 generations of operating systems with different HAL versions if single or multi CPUs.

My VMware blog: www.rickardnobel.se
Cyberfed27
Hot Shot
Hot Shot
Jump to solution

I too have not had any issues changing the number of cores/sockets on a VM, linux or windows.

Modern operating systems have gotten much better at handling this.

Reply
0 Kudos
cyclooctane
Enthusiast
Enthusiast
Jump to solution

I can conferm that I have never had an issue with changing number of cores/sockets on Linux VMs.

Centos 6.X

Redhat 6.X

Ubuntu 10.04 and up

All handle it fine.

These are just the distros that I have run in production at work.

I have not had the chance to test others but I would assume they would also be fine.

Regards

Reply
0 Kudos
fromet
Contributor
Contributor
Jump to solution

Thanks rickarnobel for your answer.

Yes my app require a high CPU usage.

On the other hand the host's CPUs are "fine",  any way I'll try to add a couple of vCPUs.

One more question, last night I was monitoring the VM and at some point it reaches more than 10000 mhz (the limit is 9575 mhz), I wonder if that means that those 4 vCPUs are taking CPU cicles when they needed? The CPU usage (%) was flat at 100% when the CPU in mhz was over 10000 mhz.

Regards,

Rafael

Reply
0 Kudos
rickardnobel
Champion
Champion
Jump to solution

fromet wrote:

One more question, last night I was monitoring the VM and at some point it reaches more than 10000 mhz (the limit is 9575 mhz),

Did you have a "limit" on 9575 or a "reservation"? You mentioned earlier a reservation, which could be looked at as a minimum level, but not maximum.

My VMware blog: www.rickardnobel.se
fromet
Contributor
Contributor
Jump to solution

Hi,

I attached the setting.

Is about the initial settings and the changes I did.

Regards,

Rafael

Reply
0 Kudos
ThompsG
Virtuoso
Virtuoso
Jump to solution

If I'm reading your attachment correctly this VM has a reservation of 9.57Ghz but is NOT limiting the CPU cycles it can consume therefore you will be able to utilize all the CPU available to it, i.e. 10.52 GHz

One other thing to note: depending on your vSphere licensing you may not be able to add additonal vCPU to this VM. ESX(i) 4 is limited to 4 with Enterprise licensing - 8 with Enterprise Plus.

Kind regards.

Reply
0 Kudos