
Issue 11
© Solarflare Communications 2014
92
Solarflare Server Adapter
User Guide
This output shows that there are four channels (rows) set up between four cpus (columns).
2
Determine the CPUs to which these interrupts are assigned to:
# cat /proc/irq/123/smp_affinity
00000000,00000000,00000000,00000000,00000000,00000000,00000000,000000
01
# cat /proc/irq/131/smp_affinity
00000000,00000000,00000000,00000000,00000000,00000000,00000000,000000
02
# cat /proc/irq/139/smp_affinity
00000000,00000000,00000000,00000000,00000000,00000000,00000000,000000
04
# cat /proc/irq/147/smp_affinity
00000000,00000000,00000000,00000000,00000000,00000000,00000000,000000
08
This shows that
RXQ[0]
is affinitized to
CPU[0]
,
RXQ[1]
is affinitized to
CPU[1]
, and so on.
With this configuration, the latency and cpu utilization for a particular TCP flow will be
dependant on that flow’s RSS hash, and which CPU that hash resolves onto.
3
Set all network interface interrupts to a single CPU (in this case
CPU[0]
):
# echo 1 > /proc/irq/123/smp_affinity
# echo 1 > /proc/irq/131/smp_affinity
# echo 1 > /proc/irq/139/smp_affinity
# echo 1 > /proc/irq/147/smp_affinity
Set the application to run on the same CPU (in this case
CPU[0]
) as the network interface’s
interrupts:
# taskset 1 netperf
# taskset 1 netperf -H <host>
NOTE:
Interrupt line numbers and their initial CPU affinity are not guaranteed to be the same
across reboots and driver reloads. Typically, it is therefore necessary to write a script to query these
values and apply the affinity accordingly.
NOTE:
The read-back of
/proc/irq/N/smp_affinity
will return the old value until a new
interrupt arrives.