OpenVZ Forum


Home » General » Support » [how-to] allocating disk quota / memory / cpu
CPU shares (Re: [how-to] allocating disk quota / memory / cpu) [message #2713 is a reply to message #2698] Mon, 17 April 2006 22:45 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Think of cpu shares as a proportional weights. Remember, that all 100% of the CPU can be taken by a single VE if nobody else is using it. Still, in a situation when every VE demands a CPU, CPU time is shared according to cpuunits values, i.e. a VE which has less CPU share will get less CPU time.

Speaking of guarantees, as long as you do not oversell (i.e. sum of all cpuunits for all VEs + for the host system itself do not exceed "power of the node") -- you can guarantee a given share. If you oversell -- you can not guarantee that.

One more thing -- if you really want to hard limit CPU usage for a given VE, use --cpulimit parameter. In that case a VE will not be given more CPU time when specified by cpulimit, even if the CPU will be idling otherwise. But in real life this limit does not make much sense, unless you want something strange, e.g. see how does an application work on a slow hardware, or the like.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
 
Read Message icon4.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: can't connect to public VPS randomly
Next Topic: max. amount of memory for ve limited?
Goto Forum:
  


Current Time: Wed Jul 10 17:25:12 GMT 2024

Total time taken to generate the page: 0.03067 seconds