Dividing cpu cycles between processes
I have an Ubuntu server system on which i want to run multiple virtual machines.
But some VMs are more important than others, and i wish to guarantee them a minimum cpu access (if they need it).
example 1 : if there were 2 VMs, i would like to be able to grant one of them a number of cpu cycles 4 times greater. Also, if one of the machines isn't using all it's allocated cpu time, the other one must be able to use it.
example 2 more complex : if i have N VMs, i want to be able to set for each VM a minimum % of cpu usage. But if a VM doesn't need it, another VM can use it. This way, every VM get at least the % indicated, but can receive more if the other VMs are not using their time.
I know about 'cpulimit' , but it only knows how to set an upper limit. I need something that is flexible at the upper part.
Does anyone have a solution for this ?
Thanks in advance :)