Vmware limit cpu usage

vmware-server

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..

Best Answer

A Simple Way:
CPU:
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.

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

Disk:
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.

Related Topic