OpenVZ Forum


Home » General » Support » how many cpuunits have the quad core processor?
how many cpuunits have the quad core processor? [message #34525] Thu, 15 January 2009 10:12 Go to next message
jevelyt is currently offline  jevelyt
Messages: 19
Registered: January 2009
Junior Member
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).
Re: how many cpuunits have the quad core processor? [message #34528 is a reply to message #34525] Thu, 15 January 2009 12:50 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
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


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: how many cpuunits have the quad core processor? [message #34530 is a reply to message #34525] Thu, 15 January 2009 13:56 Go to previous messageGo to next message
jevelyt is currently offline  jevelyt
Messages: 19
Registered: January 2009
Junior Member
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 )

[Updated on: Thu, 15 January 2009 13:57]

Report message to a moderator

Re: how many cpuunits have the quad core processor? [message #34532 is a reply to message #34530] Thu, 15 January 2009 14:30 Go to previous message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
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


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Previous Topic: IPv6 - arp problem
Next Topic: vzdump - gzip doesn't work
Goto Forum:
  


Current Time: Mon Jul 15 20:58:57 GMT 2024

Total time taken to generate the page: 0.02497 seconds