My CentOS / RHEL based server is configured with Intel PRO/1000 network interface cards. NAPI (Rx polling mode) is supported in the e1000 driver. I've multiple CPUs. How do I configure NAPI, decreasing interrupts and improve overall server network performance?
NAPI is enabled or disabled based on the configuration of the kernel. e1000 driver does supports NAPI.
Downolad the latest driver version by visting the following url:
- Linux kernel driver for the Intel(R) PRO/100 Ethernet devices, Intel(R) PRO/1000 gigabit Ethernet devices, and Intel(R) PRO/10GbE devices.
To enable NAPI, compile the driver module, passing in a configuration option:
make CFLAGS_EXTRA=-DE1000_NAPI install
Once done simply install new drivers.
If you've multiprocessor systems, consider binding the interrupts of the network interface cards to a physical CPU to gain additional performance. Find out IRQ of of the network card, run:
# ifconfig eth0
# ifconfig eth0 | grep -i Interrupt
To set the smp_affinity i.e. bound interrupt 179 of eth0 to the third processor in the system, enter:
# echo 03 > /proc/irq/179/smp_affinity
Add above command to /etc/rc.local. See Intel e1000 documentation for more information (Kernel v2.6.26 or above turns on NAPI support by default). Broadcom tg3 drives also support NAPI and the latest version comes with built in NAPI support.