Tuning the kernel for network performance
Most modern Linux kernels ship sufficiently tuned for various network workloads. Some distributions provide predefined tuning services (a good example is tuned
for Red Hat/CentOS), which include a set of profiles based on the server role.
Let's go over the steps taken during data transmission and reception, on a typical Linux host, before we delve into how to tune the hypervisor:
- The application first writes the data to a socket, which in turn is put in the transmit buffer.
- The kernel encapsulates the data into a Protocol Data Unit (PDU).
- The PDU is then moved onto the per-device transmit queue.
- The Network Interface Cards (NIC) driver then pops the PDU from the transmit queue and copies it to the NIC.
- The NIC sends the data and raises a hardware interrupt.
- On the other end of the communication channel, the NIC receives the frame, copies it on the receive buffer, and raises hard interrupt.
- The kernel in turn handles the interrupt and raises a soft interrupt...