OpenVZ Forum


Home » General » Support » vzctl set cpuunits and vzcpucheck strange behaviour
Re: vzctl set cpuunits and vzcpucheck strange behaviour [message #42468 is a reply to message #38680] Wed, 20 April 2011 11:11 Go to previous message
davidh is currently offline  davidh
Messages: 1
Registered: April 2011
Junior Member
The answer is simple. There is some magic number 500.000 in the code which is used to round numbers. I found the origin here: wiki.openvz.org/Fairsched_API#CPU_limit

So I found my vzcpucheck value of 479343 and I want every vz container to have 1/7 of the cpu time == 68477. When I enter this with vzctl I get 71428 as the value which is set.

Here is how the 500.000 number works: 500.000/71428 is an int! The next best lower number is 62500 cpuunits. When I enter that 7 times I get underbooking (which is what I want).
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: service vz start, command not found centOS 5.5
Next Topic: yum update : vzeventmod
Goto Forum:
  


Current Time: Thu Oct 09 16:41:15 GMT 2025

Total time taken to generate the page: 0.12944 seconds