Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi i have centOS dedicated server and installing vmware server how i can limit cpu/resource usage for each vm ? its very big problem my XEON server are overload..

share|improve this question

A Simple Way:
I would recommend setting the 'niceness' of the each process that corresponds to the VM. This doesn't really limit how much CPU is used, but rather sets the priority that the scheduler will give it.

You can change the priority of a process with the renice command. -20 is the highest priority, 20 is the lowest priority:

renice 10 -p 12345 #Where 12345 is the pid of the vmware process for the vm you want to limit.

To increase the priority, The command may need to be run as the superuser.

The amount of Memory a VM gets is set with the VM properties inside of VMware Server, I would start with that.

Disk IO can be one of the problems with VMs. You can get some number of disk performance with the iostat command which is part of the sysstat package. You can then use the ionice to change the disk priority. For example, to set a vm to 'idle' disk priority:

ionice -c3 -p12345

A Little More Complicated:
You could run the VMs as a specified user, and use PAM and the /etc/security/limits.conf to limit the resources run by the user.

share|improve this answer
Also found a post that say you can accomplish the nice levels in a he vmx config file with vmx.threadPriority = "-4" and aioMgr.threadPriority = "-4" , but I have never tried that myself. – Kyle Brandt Aug 18 '09 at 11:38

For a very simple solution, take a look at cpulimit, which lets you set a CPU usage limit per process, expressed in percentage.

share|improve this answer

I'm not sure if vmware server can do it, but if you install ESXi (free) then you can limit the CPU usage per vm. Note, this will overwrite the entire system, effectively giving you a dedicated vmware device.

share|improve this answer

There is no way that I know of, aside form limiting each VM to one vCPU which is the default, of throttling CPU use per VM in VMWare Server.

You might find such features in the "bare metal" VM solution (ESX) or its free equivalent ESXi.

share|improve this answer

I'm 99% sure there is no resource control in regular Server, there's loads in ESX though but that's no use to you.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.