Red Hat Enterprise Linux Network Performance Tuning
PACKET RECEPTION IN THE LINUX KERNEL
The NIC ring buffer
Receive ring buffers are shared between the device driver and NIC. The card assigns a transmit (TX) and receive (RX) ring buffer
Interrupts and Interrupt Handlers Interrupts from the hardware are known as “top-half” interrupts
When a NIC receives incoming data, it copies the data into kernel buffers using DMA.
Hard interrupts can be seen in /proc/interrupts where each queue has an interrupt vector in the 1st column assigned to it
SoftIRQs Also known as “bottom-half” interrupts, software interrupt requests (SoftIRQs) are kernel routines which are scheduled to run at a time when other tasks will not be interrupted. The SoftIRQ's purpose is to drain the network adapter receive ring buffers. These routines run in the form of ksoftirqd/cpu-number processes and call driver-specific code functions. They can be seen in process monitoring tools such as ps and top.
SoftIRQs can be monitored as follows. Each column represents a CPU:
Networking Tools
To properly diagnose a network performance problem, the following tools can be used:
netstat
A command-line utility which can print information about open network connections and protocol stack statistics. It retrieves information about the networking subsystem from the /proc/net/ file system. These files include:
• /proc/net/dev (device information)
• /proc/net/tcp (TCP socket information)
• /proc/net/unix (Unix domain socket information)
For more information about netstat and its referenced files from /proc/net/, refer to the netstat man page: man netstat.
dropwatch
A monitoring utility which monitors packets freed from memory by the kernel. For more information, refer to the dropwatch man page: man dropwatch.
ip
A utility for managing and monitoring routes, devices, policy routing, and tunnels. For more information, refer to the ip man page: man ip. ethtool A utility for displaying and changing NIC settings. For more information, refer to the ethtool man page: man ethtool.
Comments
Post a Comment