OpenVZ Forum - RDF feed
type: channel
items: how many cpuunits have the quad core processor?
items: Re: how many cpuunits have the quad core processor?

how many cpuunits have the quad core processor?
type: item
description: Hello, I want to ask if there is a single processor then it has 100 cpuunits (100% cpu), but if I have the quad core(q9550) processor then it has 400 cpuunits? (100% cpu) I'm right? Because I want to limit guaranted CPU for the containers and there is only this option (cpuunits with ratios doesn't fit me).
creator: jevelyt
date: 2009-01-15T10:12:52-00:00

Re: how many cpuunits have the quad core processor?
type: item
description: Hello. i'm not sure i understood right what are you going to do, but please, note that cpuunit ans cpulimits are completely different things. cpuunits - is just a number. Its absolute value is not very important, Containers will get the node's power in proportion of their cpuunits. cpulimit - is calculated in %. It determines how many % of single CPU the Container will get. If your node has one cpu - the Container can receive upto 100% of the single cpu. If your node has 2 cpus/core, a Container can receive potentially 200% of the _single_ cpu, etc. Hope that helps. -- Konstantin
creator: khorenko
date: 2009-01-15T12:50:18-00:00

Re: how many cpuunits have the quad core processor?
type: item
description: Ok, if I have quad core processor(4 cores) q9550, 2,83 Ghz and I want to give for a container for example 2% of all cores I must write cpulimit 8?(2% * 4cores = 8 )
creator: jevelyt
date: 2009-01-15T13:56:21-00:00

Re: how many cpuunits have the quad core processor?
type: item
description: Correct. If you set cpulimit=8 in your configuration, the Container will use 2% of each core. Warning: i strongly do not recommend use of so low cpulimit. In fact i do not see many advantages of cpulimit use - why to limit the power if it's not used at the moment by other Containers? But especially setting cpulimit to a small value can degrade the overall node's performance. Let's imagine that poor Container with cpulimit=8 wants to write something to the disk. It grabs appropriate fs (/vz!) locks and start writing. Ooops! cpu time for that Container is over and now other processes from other Containers work for relatively long time. But imagine other process from other CT wants to write something.. it tries to get locks (for the same /vz!) and can so nothing cause lock is grabbed by "slow" process from the CT with small cpulimit. So i believe cpuunits is better and more efficient regulator but again, please, do not set too different values for cpuunits due to possibly the same problem. Thanks. -- Konstantin
creator: khorenko
date: 2009-01-15T14:30:28-00:00