Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Fairsched API

4 bytes removed, 08:46, 25 January 2011
no edit summary
It is possible to limit the CPU usage of the host system. The host system's id equals <code>INT_MAX</code> (2147483647).
CPU limits are available only in rhel5-based and rhel6-based kernels, and they behave a bit differently in them in respect of distributing the CPU time among CPUs the VE can execute on.
In the rhel5 kernel the limit has a container-wide meaning. For example, if there are 2 CPUs available for a container, and the limit is set to 1024 (of 2048), the container's CPU usage can be 100/0%, or 50/50%, or any other values whose sum does not exceed 100%.
In the rhel6 kernel the limit is divided between the CPUs proportionally, and a busy CPU cannot borrow time from an idle one, i.e. with a 2 CPUs container and 1024 (of 2048) limit set the usage of each CPU cannot exceed 50% in any case.
As a result, the minimal value for the limit is 1 in the rhel5 kernel and 1 * NUM_CPUS in the rhel6 kernel. If the given limit value is out of the allowed range it is automatically clamped to the range.