9.3.6. 使用 emulatorpin
调优域进程固定策略的另一种方式是在
<emulatorpin>
中使用 <cputune>
标签。
<emulatorpin>
标签指定 仿真程序 (并非包括 vCPU)的仿真程序(不包括 vCPU)的物理 CPU。<emulatorpin>
标签提供了一种精确的关联性到仿真程序线程进程的方法。因此,vhost 线程在物理 CPU 和内存的同一子集中运行,因此可以受益于缓存。 例如:
<cputune> <emulatorpin cpuset="1-3"/> </cputune>
注意
在 Red Hat Enterprise Linux 7 中,默认启用自动 NUMA 平衡。自动 NUMA 平衡减少了手动调优
<emulatorpin>
的需求,因为 vhost-net 模拟器线程会更可靠地遵循 vCPU 任务。有关自动 NUMA 平衡的详情,请参考 第 9.2 节 “自动 NUMA Balancing”。