irqbalance服务描述
irqbalance 是一个 Linux 守护进程,它在计算机系统中的处理器和内核之间分配中断。
irqbalance 的设计目标是在节能和最佳性能之间找到平衡。
在很大程度上,irqbalance 所做的工作对我们来说是不可见的。
守护进程在功耗和性能之间取得平衡。
irqbalance 与多处理器 x86. x86_64 和 AMD 系统相关。
irqbalance 配置文件 /etc/sysconfig/irqbalance 允许选择可以分配哪些中断的 CPU。
下面是来自 RHEL 7 系统的示例配置文件。
# cat /etc/sysconfig/irqbalance # irqbalance is a daemon process that distributes interrupts across # CPUS on SMP systems. The default is to rebalance once every 10 # seconds. This is the environment file that is specified to systemd via the # EnvironmentFile key in the service unit file (or via whatever method the init # system you're using has. # # ONESHOT=yes # after starting, wait for a minute, then look at the interrupt # load and balance it once; after balancing exit and do not change # it again. #IRQBALANCE_ONESHOT= # # 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= # # IRQBALANCE_ARGS # append any args here to the irqbalance daemon as documented in the man page # #IRQBALANCE_ARGS=
可配置项如下所示:
参数 | 默认值 | 描述 |
---|---|---|
ONESHOT | NO | 系统运行10秒后,调整一次中断服务分配,然后退出。 |
IRQ_AFFINITY_MASK | 空的 | 一个位掩码,其 1 位指示在平衡中断请求时应跳过哪个 CPU。这允许给定的一组 CPU's 不受任何中断服务负载的干扰。此设置仅用于旧版兼容性;改用 IRQBALANCE_BANNED_CPUS。 |
IRQBALANCE_BANNED_INTERRUPTS | 空的 | 以空格分隔的中断请求级别列表,irqbalance 在平衡时应忽略这些级别。这允许中断保持在同一个 CPU 上;这可以通过增加中断服务代码和上下文保存在 CPU 的高速缓存中的可能性并避免昂贵的缓存行刷新来提高性能。 |
IRQBALANCE_BANNED_CPUS | 空的 | 一个位掩码,其 1 位表示那些 CPU's 不应分配给它们的中断服务。这可以通过消除中断服务开销来提高性能,尤其是 CPU L1 和 L2 缓存重新加载。 |
服务详情
init.d 脚本位置 -> /etc/init.d/irqbalance
“chkconfig -list [service]”示例
# chkconfig --list irqbalance irqbalance 0:off 1:off 2:on 3:on 4:on 5:on 6:off
可用的服务使用选项:
# service irqbalance Usage: /etc/init.d/irqbalance {start|stop|status|restart|reload|condrestart}
# service irqbalance start Starting irqbalance: [ OK ]
# service irqbalance stop Stopping irqbalance: [ OK ]
# service irqbalance status irqbalance (pid 14857) is running...
# service irqbalance restart Stopping irqbalance: [ OK ] Starting irqbalance: [ OK ]
# service irqbalance reload Stopping irqbalance: [ OK ] Starting irqbalance: [ OK ]
# service irqbalance condrestart
它运行哪些守护进程:/usr/sbin/irqbalance
它加载哪些模块:无
www. On IT Road .com
其他信息
RPM 包:irqbalance-[版本]-[发布]
例如:irqbalance-1.0.4-10.el6.x86_64
配置文件:/etc/sysconfig/irqbalance
项目主页:https://github.com/Irqbalance/irqbalance
什么时候不应该使用
在大多数情况下,irqbalance 服务是启用的,除非:
- 出于很好的理由(低延迟、实时要求等)手动将应用程序/IRQ 固定到特定内核
- 虚拟客人。这实际上没有意义,因为除非我们将访客固定到特定的 CPU 和 IRQ 以及专用的网络/存储硬件,否则我们可能看不到在裸机上的好处。
日期:2020-09-17 00:14:35 来源:oir作者:oir