Enablement and Verification
Configure the VM XML file to map the CPU cluster topology information of the physical host to the VM, and enable the cluster-aware scheduler on the VM to enable this feature. Observe the scheduling group status of each vCPU before and after the feature is enabled to check whether the feature is successfully enabled.
- Configure the CPU topology in the VM XML file.For example, if the vCPUs on the VM with the specification of 16 vCPUs and 32 GB memory are bound to four clusters (16 cores) in 1:1 mode, the optimal configuration is as follows:
1<topology sockets='1' dies='1' clusters='4' cores='4' threads='1'/>
- Run the following commands in the guest OS to ensure that the cluster-aware scheduler is disabled and observe the scheduling group of each vCPU:
1 2
echo 0 > /proc/sys/kernel/sched_cluster cat /proc/schedstat
After the preceding command is executed, the CPU scheduling group information is displayed, as shown in the following figure.

- In the guest OS, enable the cluster-aware scheduler and observe the scheduling group of each vCPU.
1 2
echo 1 > /proc/sys/kernel/sched_cluster cat /proc/schedstat
After the preceding command is executed, the CPU scheduling group information is displayed, as shown in the following figure.

Compared with step 2, a scheduling group (domain) is added to each vCPU after the feature is enabled.
Parent topic: Feature Usage