Re: vzctl set cpuunits and vzcpucheck strange behaviour [message #42468 is a reply to message #38680] |
Wed, 20 April 2011 11:11  |
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).
|
|
|