Enhancing Intel 210 Network Card Performance with Static IRQ Affinity in Linux
Intel 210 network cards support four combined FIFO channels, which can handle a significant amount of network traffic. However, by default, the IRQ handlers for these channels are assigned to a single core, which can lead to bottlenecks and reduce the overall performance of the network card.
What is IRQ Affinity?
IRQ affinity is a feature in Linux that allows you to bind interrupt handlers to specific CPU cores. By default, the Linux kernel balances interrupts across all available cores, but in some cases, it can be beneficial to statically assign interrupts to specific cores. This is especially true for network cards, where bonding interrupts to specific cores can improve performance and reduce latency.
Why Static IRQ Affinity for Intel 210 Network Cards?
The Intel 210 network card has four combined FIFO channels, which can handle a significant amount of network traffic. However, by default, the IRQ handlers for these channels are assigned to a single core. This can lead to bottlenecks and reduce the overall performance of the network card. By using static IRQ affinity, you can spread the IRQ handlers across the first four cores of the system, which can improve performance and reduce latency.
How to Set Static IRQ Affinity for Intel 210 Network Cards
To set static IRQ affinity for Intel 210 network cards, you can use the devrule command. The devrule command allows you to create rules that bind devices to specific CPU cores. Here's an example of how to use the devrule command to set static IRQ affinity for an Intel 210 network card:
# echo '4 0 1 2 3' > /etc/devrule/intel_210
This command sets the IRQ affinity for the Intel 210 network card to the first four cores of the system (cores 0, 1, 2, and 3). The first number (4) specifies the number of IRQs to bind. The remaining numbers (0 1 2 3) specify the CPU cores to bind the IRQs to.
Testing Static IRQ Affinity
To test the performance improvement of static IRQ affinity, you can use a benchmarking tool such as netperf. Here's an example of how to use netperf to test the performance of an Intel 210 network card:
# netperf -H -t TCP_RR -c 10
This command runs a TCP_RR test for 10 connections to a server at the specified IP address. You can compare the performance before and after setting static IRQ affinity to see if there is an improvement.