User Manual
Rev 2.1-1.0.6
Mellanox Technologies
135
7.2.6.3.1 Running an Application on a Certain NUMA Node
In order to run an application on a certain NUMA node, the process affinity should be set in
either in the command line or an external tool.
For example, if the adapter's NUMA node is 1 and NUMA 1 cores are 8-15 then an application
should run with process affinity that uses 8-15 cores only.
To run an application, run the following commands:
or:
7.2.7 IRQ Affinity
The affinity of an interrupt is defined as the set of processor cores that service that interrupt. To
improve application scalability and latency, it is recommended to distribute interrupt requests
(IRQs) between the available processor cores. To prevent the Linux IRQ balancer application
from interfering with the interrupt affinity scheme, the IRQ balancer must be turned off.
The following command turns off the IRQ balancer:
The following command assigns the affinity of a single interrupt vector:
Bit i in <hexadecimal bit mask> indicates whether processor core i is in <irq vector>'s affinity or not.
7.2.7.1 IRQ Affinity Configuration
It is recommended to set each IRQ to a different core.
For Sandy Bridge or AMD systems set the irq affinity to the adapter's NUMA node:
• For optimizing single-port traffic, run:
• For optimizing dual-port traffic, run:
• To show the current irq affinity settings, run:
7.2.7.2 Auto Tuning Utility
MLNX_OFED 2.0.x introduces a new affinity tool called mlnx_affinity. This tool can automati-
cally adjust your affinity settings for each network interface according to the system architecture.
Usage:
• Start
taskset -c 8-15 ib_write_bw -a
taskset 0xff00 ib_write_bw -a
> /etc/init.d/irqbalance stop
> echo <hexadecimal bit mask> > /proc/irq/<irq vector>/smp_affinity
set_irq_affinity_bynode.sh <numa node> <interface>
set_irq_affinity_bynode.sh <numa node> <interface1> <interface2>
show_irq_affinity.sh <interface>
# mlnx_affinity start