IRQBALANCE(1)
๐ IRQBALANCE(1) ๐
okay bestie, so this is the manual for irqbalance โ it lives in section 1 of the manual (that's the "user commands" section, iykyk) and it is genuinely one of the most underrated little daemons out there. let's get into it ๐ซถ
โจ NAME โจ
irqbalance โ distribute hardware interrupts across processors on a multiprocessor system
๐ธ SYNOPSIS ๐ธ
irqbalance
that's it. that's the whole synopsis. she's lowkey minimalist ๐
๐ฆ DESCRIPTION ๐ฆ
The whole point of irqbalance is to spread hardware interrupts across the processors on a multiprocessor system so everything gets faster. That's the entire mission statement, no cap. ๐ฅ
๐ OPTIONS ๐
-o,--oneshotโ makesirqbalancerun exactly once, and then the daemon dips out. one and done, iconic behaviour โจ-d,--debugโ makesirqbalanceprint extra debug info. heads up: this implies--foreground, so you get both whether you asked or not ๐ซฃ-f,--foregroundโ makesirqbalancerun in the foreground (and that's without--debug).-j,--journalโ turns on log output that's optimized forsystemd-journal. journal girlies rise ๐-p,--powerthresh=<threshold>โ sets the threshold at which we try to move a CPU into powersave mode. here's the vibe: if more than<threshold>CPUs are more than 1 standard deviation below the average CPU softirq workload, and no CPUs are more than 1 standard deviation above (and have more than 1 IRQ assigned to them), then it attempts to place 1 CPU in powersave mode. and in powersave mode, a CPU gets no IRQs balanced to it at all โ the goal being to stop that CPU from waking up without need. let her sleep ๐ด-i,--banirq=<irqnum>โ adds the specified IRQ to the set of banned IRQs.irqbalancewill not touch the affinity of any IRQs on the banned list, which lets you set them manually yourself. this option is additive and can be specified multiple times. for example, to ban IRQs 43 and 44 from balancing, use this command line:
irqbalance --banirq=43 --banirq=44
-m,--banmod=<module_name>โ adds the specified module to the set of banned modules, same energy as--banirq.irqbalancewill not affect the affinity of any IRQs belonging to the given modules, so you can specify them manually. this option is additive and can be specified multiple times. for example, to ban all IRQs of modulefooand modulebarfrom balancing:
irqbalance --banmod=foo --banmod=bar
-c,--deepestcache=<integer>โ this lets you specify the cache level at whichirqbalancepartitions cache domains. specifying a deeper cache may giveirqbalancea greater degree of flexibility to assign IRQ affinity and squeeze out bigger performance increases, but setting a cache depth too large on some systems โ specifically where all CPUs on a system share the deepest cache level โ will causeirqbalanceto see balancing as unnecessary. ๐ example:
irqbalance --deepestcache=2
The default value for deepestcache is 2.
-l,--policyscript=<script>โ when specified, the referenced script or directory will execute once for each discovered IRQ, with the sysfs device path and IRQ number passed as arguments. quick note: the device path argument will point to the parent directory from which the IRQ attributes directory may be directly opened. policy scripts need to be owned and executable by the user of theirqbalanceprocess, and if a directory is specified, non-executable files will be skipped. the script may specify zero or morekey=valuepairs that guideirqbalancein the management of that IRQ. thosekey=valuepairs get printed by the script on stdout and get captured and interpreted byirqbalance.irqbalanceexpects a zero exit code from the provided utility. recognizedkey=valuepairs are:ban=[true | false]โ directsirqbalanceto exclude the passed-in IRQ from balancing.balance_level=[none | package | cache | core]โ lets you override the balance level of a given IRQ. by default, the balance level is determined automatically based on the PCI device class of the device that owns the IRQ.numa_node=<integer>โ lets you override the NUMA node that sysfs says a given device IRQ is local to. often, systems won't specify this info in ACPI, and as a result devices are considered equidistant from all NUMA nodes in the system. this option lets you override that hardware-provided info soirqbalancecan bias IRQ affinity for those devices toward their most local node. note: specifying a-1here forcesirqbalanceto consider an interrupt from a device to be equidistant from all nodes.
Also: if a directory is specified rather than a regular file, all files in the directory will be considered policy scripts, and executed on adding of an irq to a database. If such a directory is specified, scripts in the directory must additionally exit with one of the following exit codes:
0โ this indicates the script has a policy for the referenced irq, and that further script processing should stop.1โ this indicates that the script has no policy for the referenced irq, and that script processing should continue.2โ this indicates that an error has occurred in the script, and it should be skipped (further processing to continue).
--migrateval,-e <val>โ specify a minimum migration ratio to trigger a rebalancing. normally, any improvement in load distribution will trigger the migration of an irq, as long as performing the migration won't simply move the load to a new cpu. by specifying a migration value, the load balance improvement is subject to hysteresis defined by this value, which is inversely proportional to the value. for example, a value of 2 in this option tellsirqbalancethat the improvement in load distribution must be at least 50%; a value of 4 indicates the load distribution improvement must be at least 25%, etc. โญ-s,--pid=<file>โ haveirqbalancewrite its process id to the specified file. by default, no pidfile is written. the written pidfile is automatically unlinked whenirqbalanceexits. it is ignored when used with--debugor--foreground. ๐-t,--interval=<time>โ set the measurement time forirqbalance. it will sleep for<time>seconds between samples of the irq load on the system cpus. defaults to 10.
๐ ENVIRONMENT VARIABLES ๐
IRQBALANCE_ONESHOTโ same as--oneshot.IRQBALANCE_DEBUGโ same as--debug.IRQBALANCE_BANNED_CPUSโ provides a mask of CPUs whichirqbalanceshould ignore and never assign interrupts to. if not specified,irqbalanceuses the mask of isolated and adaptive-ticks CPUs on the system as the default value. the"isolcpus="boot parameter specifies the isolated CPUs, and the"nohz_full="boot parameter specifies the adaptive-ticks CPUs. by default, no CPU will be an isolated or adaptive-ticks CPU. this is a hexmask without the leading'0x'. on systems with large numbers of processors, each group of eight hex digits is separated by a comma','. i.e.export IRQBALANCE_BANNED_CPUS=fc0would preventirqbalancefrom assigning irqs to the 7th-12th cpus (cpu6-cpu11), orexport IRQBALANCE_BANNED_CPUS=ff000000,00000001would preventirqbalancefrom assigning irqs to the 1st (cpu0) and 57th-64th cpus (cpu56-cpu63).
Notes: This environment variable will be discarded โ please use IRQBALANCE_BANNED_CPULIST instead. Before deleting this environment variable, introduce a deprecation period first for the consider of compatibility. ๐ซถ
IRQBALANCE_BANNED_CPULISTโ provides a cpulist whichirqbalanceshould ignore and never assign interrupts to. if not specified,irqbalanceuses the mask of isolated and adaptive-ticks CPUs on the system as the default value.
๐ SIGNALS ๐
SIGHUPโ forces a rescan of the available IRQs and system topology.
๐ง API ๐ง
irqbalance is able to communicate via socket and return its current assignment tree and setup, as well as set new settings based on sent values. the socket is abstract, with a name in the form of irqbalance<PID>.sock, where <PID> is the process ID of the irqbalance instance to communicate with. possible values to send:
statsโ retrieve the assignment tree of IRQs to CPUs, in a recursive manner. for each CPU node in the tree, its type, number, load and whether the save mode is active are sent. for each assigned IRQ type, its number, load, number of IRQs since last rebalancing and its class are sent. refer to thetypes.hfile for explanation of defines.setupโ get the current value of the sleep interval, mask of banned CPUs and list of banned IRQs.settings sleep <s>โ set a new value of the sleep interval,<s>>= 1.settings cpus <cpu_number1> <cpu_number2> ...โ ban the listed CPUs from IRQ handling; all old values of banned CPUs are forgotten.settings ban irqs <irq1> <irq2> ...โ ban the listed IRQs from being balanced; all old values of banned IRQs are forgotten.
irqbalance checks the SCM_CREDENTIALS of the sender (only the root user is allowed to interact). based on the chosen tools, an ancillary message with credentials needs to be sent with the request. ๐
๐ HOMEPAGE ๐
https://github.com/Irqbalance/irqbalance
and that's the whole page, bestie โ this one's a Linux manpage from December 2006, and you just read all of it, so go off ๐โจ๐๐ฆ๐ธ๐ ๐ซถ
๐ฆ where this page comes from
- alpine 3.24: irqbalance-doc 1.9.5-r0 ยท GPL-2.0-or-later
- arch rolling: irqbalance 1.9.5-3 ยท GPL-2.0-only
- fedora 44: irqbalance 2:1.9.5-2.fc44 ยท GPL-2.0-only
- nixos 26.05: irqbalance 1.9.5
- nixpkgs unstable: irqbalance 1.9.5
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms