6,534
edits
Changes
subsections of →CPU: ; warn about cpulimit not working in devel kernels
There are two parameters controlling fair CPU scheduler in OpenVZ: cpuunits and cpulimit.
=== cpuunits ===
Cpuunits are set via
<pre>
</pre>
If we started a cpu CPU intensive application on each VECT, then 103 would be given 3 times as much cpu time as 101 and 102 would get twice as much as 101, but some fraction of what 103 got. Here's how to determine what the real ratios are.
Add the three units, 1000+2000+3000 = 6000
103 gets 3000/6000 or 1/2 of the time. (50%)
The cpulimit parameter sets the absolute maximum limit for a container to a percent value. For instance:
</pre>
says that container 101 cannot ever have more than 25 percent of the cpu even if the cpu is idle for the other 75% of the time.
{{Warn|cpulimit is not yet implemented in kernels > 2.6.18 (i.e. development ones). Use stable kernel if you want this feature.}}
{{Stub}}