VMware Cloud Community
Ravi1987
Contributor
Contributor

virtual machine cpu utilisation is above 90 %

we are using esx 3.5 environment in our vmware infrastructure. i m using two 4GB ,2vcpu, 2003 sp2 virtual machine.problem is thease machine showing cpu utilisation is almost 100 percent and ram utilisation is 20 percent . this problem is giving pain to me . during high cpu utilisation virtual machine performance is very down.

Ravi
Tags (1)
0 Kudos
29 Replies
kjb007
Immortal
Immortal

Are vmware tools installed? If so, what process is taking up most of the CPU? Was this vm created with 2 vCPU, or was the SMP value increased or decreased to where it is now?

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
weinstein5
Immortal
Immortal

How many other VMs are running on the same host? How does the VM perform with a single vCPU?

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
0 Kudos
eagleh
Enthusiast
Enthusiast

1> Is it a pure File Server?

2> Tried only 1 vCPU?

3> You may use Procexp to find out which thread/process taking over your resouces most. Start from there.

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos
oreeh
Immortal
Immortal

Do these VMs utilize the correct HAL?

0 Kudos
kooltechies
Expert
Expert

Hi,

You should also check for CPU affinity rules for this VM. To resolve this problem try increasing cpu reservation and cpu share values for this VM after the checklist on the above posts.

Thanks,

Samir

P.S : If you think that the answer is helpful please consider rewarding points.

Blog : http://thinkingloudoncloud.com || Twitter : @kooltechies || P.S : If you think that the answer is correct/helpful please consider rewarding points.
0 Kudos
Ravi1987
Contributor
Contributor

Thanks for Reply.

Please tell me how to set affinity rule for VM.

Ravi
0 Kudos
Erik_Zandboer
Expert
Expert

CPU affinity is off by default, I do not think anyone is using that. And even then, it should not go berzerk - adding CPU reservations is not going to get you anywhere, but you could check if there are CPU limits set where they should not.

I would check:

1) resource settings. check these on the VM, check for any limits which are not set to "unlimited". Also, look at the upper level from the VI client (either cluster or resource pool) and check the "resource allocation" tab. Make sure all VMs listed there show normal settings (for both CPU and memory). You often see mismatches there. You might consider to look here:

2) Check your HAL. THis looks like a HAL problem. Maybe you installed the VM using one vCPU, and then changed the VM settings to 2 vCPUs? In that case you should check out the "device manager" and make sure the VM is using "ACPI Multiprocessor" HAL. You could also try to revert it back to a single vCPU and see what happens.

Visit my blog at

Visit my blog at http://www.vmdamentals.com
0 Kudos
Ravi1987
Contributor
Contributor

Thanks ERIK. For good and benifials response please let me know two things also

1. when I goes to resources setting of vm limit are set to unlimites and second

When I set the reservation for memory andd cpu what will be the calculation e.g memory and vcpu =======memory share and cpu limit(if I not set it to unlimited)

Ravi
0 Kudos
Erik_Zandboer
Expert
Expert

Hi,

By default I would always leave all limits to "unlimited". This way ESX(i) gets to decide, and that works best most of the times. What you actually do with these settings at unlimited, is granting the VM all memory it has configured (so if you give 1GB to a VM, ESX will not stand in the way (unless ESX itselfs runs out of course). Setting CPU to unlimited means, that a VM can consume an entire physical core (or more cores if you configured multiple vCPUs). For example a 1GB VM with 2vCPUs on an ESX server with 3GHz CPUs could potentially use 1GB of physical memory and 6GHz of CPU cycles.

Reservations is another story. The simple answer: NEVER use reservations unless you know what you are doing. It is described in my blog in detail though. I still miss the point of people using reservations at all (especially CPU reservations), unless it is more of an administrative guarantee... Setting reservations limits the potential of your ESX environment (because you reserve resources and thus not use them most of the time).

My advice is always: stay away from resource settings, unless you 1) know what you are doing 2) you have a real need for them (do not use them "because you can").

Visit my blog at http://erikzandboer.wordpress.com

Visit my blog at http://www.vmdamentals.com
0 Kudos
Ravi1987
Contributor
Contributor

Thnaks Eric once again,

But how can I resolve the issue when my cpu utilization is 100 % and virtual machine perform very slow.

Please give me some best practices for vm to perform good in heavy production environment.

Ravi
0 Kudos
Erik_Zandboer
Expert
Expert

Hi,

Is your HAL configured correctly? I assume your VM is very busy without actually being busy... First step then is to check the HAL....

Visit my blog at http://erikzandboer.wordpress.com

Visit my blog at http://www.vmdamentals.com
0 Kudos
Ravi1987
Contributor
Contributor

Can you please give me the steps to checl Hal and what thing I need to check.

Ravi
0 Kudos
Erik_Zandboer
Expert
Expert

Right click "my computer" ... Manage... Device manager... Computer

There is the HAL listed. For a multi vCPU VM it should read "ACPI Multiprocessor". You can adjust this by right-clicking, and choosing update driver... then select the correct HAL. You may need to show incompatible hardware in order to get to see the correct HAL. After adjusting, reboot, and hopefully the issue will be resolved then!

Visit my blog at http://erikzandboer.wordpress.com

Visit my blog at http://www.vmdamentals.com
0 Kudos
depping
Leadership
Leadership

Which process is killing the VM? How many VM's running on the host? take a look at %RDY via esxtop, this might explain why it's slow...

Duncan

Blogging:

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos
Ravi1987
Contributor
Contributor

Thanks for reply Erik.

Every thing running fine under HAL.

Some one suggest me to go resource setting and select advance cpu and memory option and defind the individual core and memory on which your vm will run. But problem is that this will not supoort when your vm is in under drs enabled cluster.please tell me how can I make this changes .please tell me is this metod is right or please tell me the alternate way so my vm will not show 100 % cpu utilization.

Ravi
0 Kudos
Ravi1987
Contributor
Contributor

Thnaks Deeping for replying .

No such problem regarding host resources.

Host have 16 gb ram and have only 54 vm with 2GB each.

Please tell how can I check %RDY via esxtop....

Ravi
0 Kudos
Erik_Zandboer
Expert
Expert

Don't go and mess with custom resource settings. If your VM is using that much CPU, you can limit, reserve, do whatever you want; the problem will not go away.

Duncans tip was excellent: Check in the VMs process list which processes use up all your CPU cycles (right click on the start bar, select "task manager", choose the processes tab, click op CPU to sort the processes so that the heaviest users show on top... Can you tell me the top users?

In you last post you stated you run 54 2GB (which equals 108GB of memory) VMs on a 16GB ESX server.... Please tell me you made a typo Smiley Happy

Visit my blog at http://erikzandboer.wordpress.com

Visit my blog at http://www.vmdamentals.com
0 Kudos
Ravi1987
Contributor
Contributor

Erik my means was 5 machine with 2 GB ram.

Ravi
0 Kudos
eagleh
Enthusiast
Enthusiast

Is it a file server? If yes, how big is the data volume? Does it accomandate MAC users? Do you use SFM?

If you found this information useful, please kindly consider awarding points for "Correct" or "Helpful". Thanks!
0 Kudos