我要评分
获取效率
正确性
完整性
易理解

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

  1. Run the top command to check the processes with high physical CPU usage. The following is an example result:

  2. Run the taskset command to bind the corresponding processes to cores 0-3.
    1
    ps -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.