12.3. 将 CPU 从 IRQ 平衡中排除
您可以使用 IRQ 平衡服务指定要排除的 CPU,以便考虑中断(IRQ)平衡。/etc/sysconfig/irqbalance
配置文件中的 IRQBALANCE_BANNED_CPUS
参数控制这些设置。参数的值是一个 64 位十六进制数掩码,掩码的每个位代表 CPU 内核。
流程
在首选的文本编辑器中打开
/etc/sysconfig/irqbalance
,并查找标题为IRQBALANCE_BANNED_CPUS
的文件部分。IRQBALANCE_BANNED_CPUS 64 bit bitmask which allows you to indicate which cpu's should be skipped when reblancing irqs. Cpu numbers which have their corresponding bits set to one in this mask will not have any irq's assigned to them on rebalance
# IRQBALANCE_BANNED_CPUS # 64 bit bitmask which allows you to indicate which cpu's should # be skipped when reblancing irqs. Cpu numbers which have their # corresponding bits set to one in this mask will not have any # irq's assigned to them on rebalance # #IRQBALANCE_BANNED_CPUS=
Copy to Clipboard Copied! -
取消注释
IRQBALANCE_BANNED_CPUS
变量。 - 输入适当的位掩码,以指定 IRQ 平衡机制要忽略的 CPU。
- 保存并关闭该文件。
如果您正在运行最多 64 个 CPU 内核的系统,请使用逗号分隔八个十六进制数。例如: IRQBALANCE_BANNED_CPUS=00000001,0000ff00
CPU | Bitmask |
0 | 00000001 |
8 - 15 | 0000ff00 |
8 - 15, 33 | 00000001,0000ff00 |
在 RHEL 7.2 及更高版本中,如果 /etc/sysconfig/ irqbalance
中未设置 IRQ
,则 irqbalance 程序会在 /etc/sysconfig/irqbalance
中通过 isolcpus
内核参数隔离。