Interrupt Moderation

 

 

 

Interrupt moderation in networking is any action that changes the 1:1 ratio between packets and interrupts. Interrupts are used by the hardware for alerting the software (networking driver) it has packets waiting to be processed. In practice, this means that interrupt moderation will sometimes cause the hardware to wait before alerting the software about incoming packets.

Interrupt Moderation Implementation

There are two methods for creating interrupt moderation in networking. One method involves using a counter to count incoming packets. Once enough packets arrive, an interrupt is generated. The second method involves using a timer, which starts after each interrupts. When it expires, it causes an interrupt to "fire".

Using only one of the methods is problematic - a counter without a timer might cause a deadlock, for example when running ping-pong traffic between to nodes. In these cases, one side waits for a response before sending more packets, and the other waits for the hardware to notify it that the packet is arriving, which would only happen if more packets would arrive. Using a timer without a counter is also risky, since high traffic loads might cause the buffers holding the incoming packets to overflow. Usually, both methods are used together in order to cover as many traffic scenarios as possible.

# ethtool -c eth4
Coalesce parameters for eth4:
Adaptive RX: off  TX: off
...
rx-usecs: 8
rx-frames: 32
...
tx-usecs: 16
tx-frames: 32

# set
ethtool -C vmnic5  rx-usecs 0 rx-frames 1 rx-usecs-irq 0 rx-frames-irq 0

Creative Commons license icon Creative Commons license icon