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=
設定可能な項目については以下で説明します:
パラメータ | デフォルト | 説明 |
---|---|---|
ワンショット | いいえ | システムが 10 秒間実行された後、割り込みサービスの割り当てを一度調整して終了します。 |
IRQ_AFFINITY_MASK | 空 | 割り込み要求のバランスをとるときにどの CPU をスキップする必要があるかを示す 1 ビットのビットマスク。これにより、CPU の特定のセットが割り込みサービスの負荷に悩まされることがなくなります。この設定は、従来の互換性のみを目的としています。代わりに IRQBALANCE_BANNED_CPUS を使用してください。 |
IRQBALANCE_BANNED_INTERRUPTS | 空 | バランシング時に irqbalance が無視する必要がある割り込み要求レベルのスペース区切りのリスト。これにより、割り込みを同じ CPU に保持できます。これにより、割り込みサービス コードとコンテキストが CPU の高速キャッシュ メモリに保持される可能性が高まり、コストのかかるキャッシュラインの更新が回避されるため、パフォーマンスが向上します。 |
IRQBALANCE_BANNED_CPUS | 空 | 割り込みサービスが割り当てられてはならない CPU を 1 ビットで示すビットマスク。これにより、割り込みサービスのオーバーヘッド、特に CPU の L1 および L2 キャッシュのリロードが取り除かれ、パフォーマンスが向上します。 |
サービス詳細
– init.d スクリプトの場所 -> /etc/init.d/irqbalance
– 「chkconfig –list [サービス]」の例
# 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
– ロードするモジュール:なし
その他の情報
– RPM パッケージ :irqbalance-[バージョン]-[リリース]
例:irqbalance-1.0.4-10.el6.x86_64
– 構成ファイル :/etc/sysconfig/irqbalance
– プロジェクトのホームページ:https://github.com/Irqbalance/irqbalance
使用すべきではない場合
ほとんどの場合、irqbalance サービスは有効になっており、次の場合を除いて使用する必要があります:
- 非常に正当な理由 (低レイテンシ、リアルタイム要件など) により、アプリ/IRQ を特定のコアに手動で固定する
- 仮想ゲスト。ゲストを特定の CPU と IRQ、および専用のネット/ストレージ ハードウェアに固定していない限り、ベア メタルの場合の利点が見られない可能性が高いため、これはあまり意味がありません。