Igalia / snabb

Snabb Switch: Fast open source packet processing
Apache License 2.0
47 stars 5 forks source link

Detect irqbalance presence and suggest remedy #1213

Closed wingo closed 5 years ago

wingo commented 5 years ago

This patch will print a warning if a network function tries to bind to a CPU, but irqbalance is detected. Irqbalance, installed by default on Debian-derived systems, will modify CPU affinities for IRQ handlers in an effort to spread out the IRQ-processing load among CPUs. However this is not what we want in Snabb; we do not want data-plane CPUs to run IRQ handlers, and we do not want bug reports coming from users that have this daemon installed.

See https://github.com/snabbco/snabb/blob/master/src/doc/performance-tuning.md#avoid-interrupts-on-data-plane-cpus, for more details.

wingo commented 5 years ago

Current output on snabb2:

$ make && sudo ./snabb lwaftr run -n lwaftr --cpu 7 --conf program/lwaftr/tests/data/icmp_on_fail.conf --on-a-stick 83:00.0
make: 'snabb' is up to date.
program/lwaftr/tests/data/icmp_on_fail.conf: loading compiled configuration from program/lwaftr/tests/data/icmp_on_fail.o
program/lwaftr/tests/data/icmp_on_fail.conf: compiled configuration is up to date.
Migrating instance 'test' to '83:00.0'
Bound main process to NUMA node: 1 (CPU 6)
Binding data-plane PID 29047 to CPU 7.
Warning: Irqbalanced detected; this will hurt performance!  Consider uninstalling via "sudo apt-get uninstall irqbalance" and rebooting.
Warning: Expected performance scaling governor for CPU 7, but got "powersave"