13–NVMe-oF Configuration with RDMA
Optimizing Performance
238
BC0154501-00 P
3.
Set the IRQ affinity for all 45000 Series Adapters. The
multi_rss-affin.sh
file is a script file that is listed in
(multi_rss-affin.sh)” on page 238
.
#
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 239
.
#
./cpufreq.sh
The following sections list the scripts that are used in
and
.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 41
xxx
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.