|
|
|
|
CPU shares (Re: [how-to] allocating disk quota / memory / cpu) [message #2713 is a reply to message #2698] |
Mon, 17 April 2006 22:45 |
|
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
|
|
|
|