More efficiency: saving power in network traffic with Linux kernel 6.13

An innovation in kernel 6.13 ensures greater network traffic efficiency and switches from IRQ to polling based on the data load. It saves power and resources.

listen Print view
AI-generated anime image

(Image: erstellt mit Dall-E durch iX)

2 min. read

With the new kernel 6.13, there is a change in the way the kernel regulates network traffic. It automatically switches between interrupt requests (IRQ) and polling, which improves the balance between efficiency and load. A side effect is lower power consumption, which is particularly beneficial in high-load applications such as data centers.

With the new IRQ suspension mechanism in kernel 6.13, which can be controlled with the sysfs parameter irq_suspend_timeout, the kernel prevents CPU load caused by applications constantly requesting new data unnecessarily through polling. When switching to IRQ mode, the applications then have to wait until they are informed of new data. This saves CPU resources in idle times on the one hand, but increases the latency for the waiting applications on the other. If data flows again, the kernel switches back to polling on its own. If data is constantly flowing, there is no noticeable difference.

Videos by heise

A team led by Martin Karsten from the Canadian University of Waterloo discovered this effect when comparing network traffic in user mode (polling) to kernel mode (IRQ) and has proposed a corresponding patch for the kernel, which only comprises just under thirty lines of code.

Polling is part of the New API (NAPI) to protect the kernel from being overloaded by interrupts and to minimize latencies that occur when applications have to wait to be notified of new data via an interrupt. NAPI polling shifts the load to the demand side of the applications. These use polling to check at short intervals whether new data is available. This works well as long as data arrives. If this is not the case, the polling works empty in a continuous loop. This is where the new timeout switches and the application has to wait again.

(who)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.