FAQ - what is the irqbalance-ban.sh script

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

FAQ - What is irqbalance-ban.sh script?

Details

Aerospike service failed with the following message:

FAILED ASSERTION (cf:misc): (hardware.c:1465) please disable irqbalance or run it with the Aerospike policy script, /etc/aerospike/irqbalance-ban.sh

What is the irqbalance-ban.sh script?

Answer

The irqbalance-ban.sh script is to allow auto-pin configuration to use the cpu or numa option. When running with CPU pinning, we need to be able to configure a few settings for each of the NICs that receives client connections. One of the settings is regarding which CPUs handle interrupts for the different NIC’s receive and transmit queues. This creates a conflict with irqbalance, which controls the same thing.

When starting irqbalance service, you can specify a ban script using the --policyscript option. For Centos/Redhat systems, modify /etc/sysconfig/irqbalance to:

IRQBALANCE_ARGS=--policyscript=/etc/aerospike/irqbalance-ban.sh

For Ubuntu systems, modify /etc/default/irqbalance to:

OPTIONS="--policyscript=/etc/aerospike/irqbalance-ban.sh"

To verify, run ps and verify the irqbalance is running correctly:

 9517 ?        Ss     0:00 /usr/sbin/irqbalance --pid=/var/run/irqbalance.pid --policyscript=/etc/aerospike/irqbalance_ban.sh

You can completely disable irqbalance but it disables irqbalance for all interrupts. This includes, for example, interrupts of SSD devices, which might otherwise still have some benefit out of irqbalance. So the irqbalance-ban.sh script only disable the interrupts related to network interfaces.

Notes

  • If kernel version is old, then aerospike will fail with the following message:
 FAILED ASSERTION (socket): (hardware.c:1633) CPU pinning requires Linux kernel 3.19 or later
  • The irqbalance-ban.sh script is installed at /etc/aerospike and should looks like this:
#!/bin/bash

if [ -d ${1}/net ]; then
echo 'ban=true'
fi
  • Auto-pin may not be optimal if you observed these warnings:
WARNING (hardware): (hardware.c:1605) eth0 has very few NIC queues; only 8 out of 32 CPUs handle(s) NIC interrupts

Keywords

IRQ IRQBALANCE BAN CPU AFFINITY PIN

Timestamp

6/15/2017