Binding Service Processes to Cores
Purpose
On a compute node, some OpenStack service processes occupy a large number of CPU resources during the running of the physical machine. Bind the processes to CPU cores to stabilize the VM performance.
Procedure
- Run the top command to check the processes with high physical CPU usage. The following is an example result:

- Run the taskset command to bind the corresponding processes to cores 0-3.
1ps -ef | grep -E "nova-compute|cinder-volume|ovs-vswitchd|libvirtd" | grep -v grep| awk '{print $2}' | xargs -i taskset -pc 0-3 {}

Note
Currently, the following processes are recommended for core binding (bound to CPUs 0–3): nova-compute, cinder-volume, ovs-vswitchd, and libvirtd. You can add or delete processes and specify which physical cores to bind to.
Parent topic: OS Tuning