Configuring Number of CPUs Inside Container
If your server has more than one physical processor installed, you can control the number of CPUs which will be used to handle the processes running inside separate Containers. By default, a Container is allowed to consume the CPU time of all processors on the server, i.e. any process inside any Container can be executed on any processor on the server. However, you can modify the number of physical CPUs which will be simultaneously available to a Container using the
# pctl set 101 --cpus 2 --save
Note:
The number of CPUs to be set for a Container must not exceed the number of physical CPUs installed on the server. In this case the 'physical CPUs' notation designates the number of CPUs the Parallels Server Bare Metal kernel is aware of (you can view this CPU number using the
You can check if the number of CPUs has been successfully changed by running the
# pctl exec 101 cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Xeon(TM) CPU 2.80GHz stepping : 1 cpu MHz : 2793.581 cache size : 1024 KB ...
processor : 1 vendor_id : GenuineIntel cpu family : 15 model : 4 model name : Intel(R) Xeon(TM) CPU 2.80GHz stepping : 1 cpu MHz : 2793.581 cache size : 1024 KB ... The output shows that Container 101 is currently bound to only two processors on the server instead of 4 available for the other Containers on this server. It means that, from this point on, the processes of Container 101 will be simultaneously executed on no more than 2 physical CPUs while the other Containers on the server will continue consuming the CPU time of all 4 server processors, if needed. Also notice that the physical CPUs proper of Container 101 might not remain the same during the Container operation; they might change for load balancing reasons, the only thing that cannot be changed is their maximal number. |
||||
|