Configuring the Number of CPUs
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 in virtual machines and Containers. By default, a virtual machine and Container is allowed to consume the CPU time of all processors on the server, i.e. any process in any virtual machine and 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 virtual machine or Container using the
# pctl set 101 --cpus 2 --save Saved parameters for Container 101 # pctl set MyVM --cpus 2 set cpus(4): 2 The VM has been successfully configured. Notes:
1. The number of CPUs for a virtual machine or 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
2. Before configuring the number of CPUs for a running virtual machine, make sure that the CPU hotplug support is enabled for this virtual machine. For detailed information on the CPU hotplug feature, see Enabling CPU Hotplug for Virtual Machines .
To make sure that the number of CPUs has been successfully changed, you can log in to Container 101 and 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. |
||||
|