[Users] Question about cpulimit vs. cpuunits
Sergej Kandyla
sk.paix at gmail.com
Mon Nov 16 06:24:40 EST 2009
Scott Dowdle пишет:
> Greetings,
>
> User Woet on the #openvz channel has a question I wasn't sure the answer to so I decided to ask here.
>
> I believe he is running a Debian 5.x host node...using their 2.6.26.x-based kernel. That offers cpuunits. He is thinking about switching to the RHEL5-based kernel (assuming it'll work on Debian 5.x?) because it has cpulimit.
>
> The scenario he gives is that if he has a 2GHz processor, he can divide it up more easily with cpulimits... affectively giving a container 1GHz worth of CPU... by assigning it 50%... whereas with cpuunits he says users seem to get more of the CPU than he wants.
>
> The documentation tells how each works but doesn't really relate one to the other very well.
>
> Would anyone care to explain how to best use cpuunits to do what Woet wants to do with cpulimit?
>
> Thanks,
>
plz look
http://wiki.openvz.org/Resource_shortage
cpulimit is a hard quota of resources.
If you set for example
vzctl set 101 --cpulimit 50 --save
your VE will not use more than 50% of cpu.
cpuunits is relative limitation.
cpuunits allows your VE to use all processor time in case if
processor(s) in idle state.
Also it allows to specify the ratio of processor usage between VEs.
More information about the Users
mailing list