Configuring CPU Affinity for Virtual Machines and ContainersIf your physical server has several CPUs installed, you can bind a virtual machine or Container to specific CPUs so that only these CPUs are used to handle the processes running in the virtual machine or Container. The feature of binding certain processes to certain CPUs is known as CPU affinity. Establishing CPU affinity between virtual machines and Containers and physical processors may help you increase your system performance by up to 20%. By default, any newly created virtual machine or Container can consume the CPU time of all processors installed on the physical server. To bind a virtual machine or Container to specific CPUs, you can use the # prlctl set MyVM --cpumask 0,1,3,4-6 # prlctl set 101 --cpumask 0,1,3,4-6 You can specify the CPU affinity mask—that is, the processors to bind to virtual machines and Containers—as separate CPU index numbers (0,1,3) or as CPU ranges (4-6). If you are setting the CPU affinity mask for a running virtual machine or Container, the changes are applied on the fly. To undo the changes made to the # prlctl set MyVM --cpumask all # prlctl set 101 --cpumask all |
||||
|