By default, Containers are able to make use of all CPUs installed on the physical server, irrespective of whether it is an ordinary or NUMA(Non-Uniform Memory Access)-based server.
For example, if the server has 8 CPUs installed, Containers will consume the CPU power of all eight processors. However, if your physical sever is NUMA-based, you can enable the NUMA support inside Containers and take all the benefits provided by this technology.
Note: For more information on NUMA, refer to the Understanding Non-Uniform Memory article.
Enable the NUMA support for a container:
vzctl set CTID --numa yes --save
The decision to which NUMA node the container will be bound to is made automatically by the system.
Note!: Restart of the container is required for the change to take effect.
Configuring number of CPUs for container within NUMA node:
vzctl set CTID --cpus %number% --save
%number%is an amount of CPUs that will be simultaneously available to the container
When deciding on the number of processors for a Container, keep in mind the following: If the number of CPUs set for handling the Container processes exceeds the number of CPUs in each NUMA node, the processors will be taken from all NUMA nodes on a random basis. In the latter case, your system performance may slightly degrade.