6

I've looked into linux server tuning docs that mention installing irqbalance (http://www.irqbalance.org/) on SMP systems. I'm looking at it now on a quad-core system, and while "ps axf" can tell me it is running, I don't see any stats or information of any sorts on if/how it has affected the system.

Anyone know where to look?

1
  • I think the page says it all: "To a large degree, the work irqbalance does is invisible to you; if irqbalance performs its job right, nobody will ever notice it's there or want to turn it off." :P Oct 19, 2009 at 22:58

3 Answers 3

3

in the sourcecode they reference /proc a few time. Maybe you find your answers there. root@[/usr/local/src/irqbalance-0.55]egrep -ri "proc|sys" *

activate.c:                     sprintf(buf, "/proc/irq/%i/smp_affinity", irq->number);
cpumask.h: * set of CPU's in a system, one bit position per CPU number.
cpumask.h: * The following particular system cpumasks and operations manage
cpumask.h: *  be plugged in at anytime during the life of that system boot.
cpumask.h:int highest_possible_processor_id(void);
cputree.c: * This file contains the code to construct and manipulate a hierarchy of processors,
cputree.c: * cache domains and processor cores.
cputree.c:#include <sys/types.h>
cputree.c:      dir = opendir("/sys/devices/system/cpu");
cputree.c:                      sprintf(new_path, "/sys/devices/system/cpu/%s", entry->d_name);
irqbalance.c:#include <sys/time.h>
irqbalance.c:   /* On single core UP systems irqbalance obviously has no work to do */
irqbalance.c:   /* On dual core/hyperthreading shared cache systems just do a one shot setup */
irqbalance.c:   parse_proc_interrupts();
irqbalance.c:   parse_proc_interrupts();
irqbalance.c:           parse_proc_interrupts();
irqbalance.c:           /* cope with cpu hotplug -- detected during /proc/interrupts parsing */
irqbalance.h:extern void parse_proc_interrupts(void);
irqlist.c:#include <sys/types.h>
irqlist.c: * This function classifies and reads various things from /proc about a specific irq
irqlist.c:      sprintf(buf, "/proc/irq/%i", number);
irqlist.c:                      sprintf(buf, "/proc/irq/%i/smp_affinity", number);
Makefile:LIBS=bitmap.o irqbalance.o cputree.o  procinterrupts.o irqlist.o placement.o activate.o network.o powermode.o numa.o classify.o
network.c:#include <sys/ioctl.h>
network.c:        sprintf(buffer,"/sys/bus/pci/devices/%s/irq", driver.bus_info);
network.c:      file = fopen("/proc/net/dev", "r");
numa.c:#include <sys/types.h>
numa.c: dir = opendir("/sys/bus/pci/devices");
numa.c:         sprintf(line,"/sys/bus/pci/devices/%s/irq", entry->d_name);
numa.c:         sprintf(line,"/sys/bus/pci/devices/%s/class", entry->d_name);
numa.c:         sprintf(line,"/sys/bus/pci/devices/%s/local_cpus", entry->d_name);
numa.c: * Ethernet gets the type via /proc/net/dev; in addition down'd interfaces
powermode.c:    file = fopen("/proc/stat", "r");
powermode.c:    dummy = strtoull(c, &c, 10); /* system */
procinterrupts.c:void parse_proc_interrupts(void)
procinterrupts.c:       file = fopen("/proc/interrupts", "r");
5

Based on evildeed's answer running sudo cat /proc/irq/*/smp_affinity should tell you. If you get amore then one answer it should be working.

As the output is an integer transform of a bitmask it can be hard to understand for non-programmer types.

eg:

  • Bound to cpu0 - 1
  • Bound to cpu1 - 2
  • Bound to cpu0 and/or cpu1 - 3
  • Bound to cpu3,4,7 - 282
5

You can get a general idea of if it is doing anything by doing cat /proc/interrupts and seeing if the processes that you were trying to isolate are on creating interrupts on the processors that are supposed to be running your high priority process.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .