Users Guide
13–NVMe-oF Configuration with RDMA
Optimizing Performance
244 AH0054602-00 M
3. Set the IRQ affinity for all 41xxx Series Adapters. The
multi_rss-affin.sh
file is a script file that is listed in “IRQ Affinity
(multi_rss-affin.sh)” on page 244.
# systemctl stop irqbalance
# ./multi_rss-affin.sh eth1
4. Set the CPU frequency. The cpufreq.sh file is a script that is listed in
“CPU Frequency (cpufreq.sh)” on page 245.
# ./cpufreq.sh
The following sections list the scripts that are used in Steps 3 and 4.
IRQ Affinity (multi_rss-affin.sh)
The following script sets the IRQ affinity.
#!/bin/bash
#RSS affinity setup script
#input: the device name (ethX)
#OFFSET=0 0/1 0/1/2 0/1/2/3
#FACTOR=1 2 3 4
OFFSET=0
FACTOR=1
LASTCPU='cat /proc/cpuinfo | grep processor | tail -n1 | cut -d":" -f2'
MAXCPUID='echo 2 $LASTCPU ^ p | dc'
OFFSET='echo 2 $OFFSET ^ p | dc'
FACTOR='echo 2 $FACTOR ^ p | dc'
CPUID=1
for eth in $*; do
NUM='grep $eth /proc/interrupts | wc -l'
NUM_FP=$((${NUM}))
INT='grep -m 1 $eth /proc/interrupts | cut -d ":" -f 1'
echo "$eth: ${NUM} (${NUM_FP} fast path) starting irq ${INT}"
NOTE
A different version of this script, qedr_affin.sh, is in the 41xxx Linux
Source Code Package in the
\add-ons\performance\roce
directory. For an explanation of the IRQ affinity settings, refer to the
multiple_irqs.txt file in that directory.