Reworking 30 lines of Linux code could cut power use by up to 30 percent
Researchers at the University of Waterloo have optimized the Linux kernel to reduce data center energy consumption by up to 30%, enhancing efficiency for network-heavy applications with minimal code changes.
Read original articleResearchers at the University of Waterloo have developed a method to reduce energy consumption in data centers by up to 30% through a simple coding adjustment in the Linux operating system. Martin Karsten and his team identified inefficiencies in how the Linux kernel processes network traffic, particularly during low traffic periods when unnecessary polling consumes CPU power. By reorganizing the existing code rather than writing new lines, they created a dynamic system that adjusts polling based on network activity. This optimization, which involves about 30 lines of modified code, has been integrated into the Linux kernel version 6.13 released in January 2023. The changes are particularly beneficial for applications that rely heavily on network communication, making them more energy-efficient. The researchers aim to promote their findings at upcoming conferences and encourage other developers to adopt similar strategies in their web servers. This initiative reflects a growing focus on sustainability and efficiency in software development, a shift from the previous emphasis on performance alone.
- A coding tweak in the Linux kernel can reduce data center energy use by up to 30%.
- The optimization involves reorganizing existing code rather than creating new lines.
- The changes have been implemented in Linux kernel version 6.13.
- The method is especially effective for network-dominant applications.
- The research highlights a renewed focus on software efficiency and sustainability.
Related
Datacenters bleed watts and cash – all because they're afraid to flip a switch
Datacenters can significantly reduce energy consumption by 25-50% through enabling power management features, which are often disabled due to performance concerns, without major impacts on performance for most workloads.
Recycled Server Components Bring More Sustainability
Researchers developed GreenSKUs, prototype servers using recycled components to reduce carbon emissions in data centers. They achieved an 8% reduction in emissions, emphasizing backward compatibility for environmental benefits.
Update to Linux kernel could cut energy use in data centres by up to 30%
Researchers at the Cheriton School of Computer Science modified the Linux kernel to reduce data center energy consumption by up to 30%, enhancing network efficiency and optimizing CPU power usage.
Linux kernel could cut energy use in data centres by up to 30 per cent
Researchers at the Cheriton School of Computer Science modified the Linux kernel to reduce data center energy consumption by up to 30%, enhancing network traffic processing and CPU efficiency.
Linux kernel tweak could cut data center power usage by up to 30%
A Linux kernel update (version 6.13) may reduce data center power usage by 30% by optimizing data delivery based on network traffic, allowing automatic switching between polling and interrupt-driven modes.
- Many commenters note that the 30% energy savings may not apply universally, as some high-performance workloads bypass the Linux kernel entirely.
- There is a discussion about the implications of busy polling and its inefficiencies, particularly when the system is not under heavy load.
- Some users express a desire for more efficient coding practices in the industry, emphasizing the importance of energy efficiency alongside performance.
- Several comments highlight the need for clearer communication in the article's title to avoid confusion about the scope of the optimization.
- There are inquiries about how to enable the new power-saving feature, indicating interest in practical implementation.
The article name is somewhat misleading, since it makes it sound like this would also apply to desktop workloads. The article says it is for datacenters and that is true, but it would have been better had the title ended with the words “in datacenters” to avoid confusion.
Instead, they use DPDK, XDP, or userspace stacks like Onload or VMA—often with SmartNICs doing hardware offload. In those cases, this patch wouldn’t apply, since packet processing happens entirely outside the kernel.
That doesn’t mean the patch isn’t valuable—it clearly helps in setups where the kernel is in the datapath (e.g., CDNs, ingress nodes, VMs, embedded Linux systems). But it probably won’t move the needle for workloads that already bypass the kernel for performance or latency reasons. So the 30% power reduction headline is likely very context-dependent.
For me, it feels like a moral imperative to make my code as efficient as possible, especially when a job will take months to run on hundreds of CPU.
The issue I was trying to resolve was sudden, dramatic changes in traffic. Think: a loop being introduced in the switching, and the associated packet storm. In that case, interrupts could start coming in so fast that the system couldn't get enough non-interrupted time to disable the interrupts, UNLESS you have more CPUs than busy networking interfaces. So my solution then was to make sure that the Linux routers had more cores than network interfaces.
https://didgets.substack.com/p/finding-and-fixing-a-billion-...
The "up to 30%" figure is operative when you have a near-idle application that's busy polling, which is already dumb. There are several ways to save energy in that case.
This is the sort of performance efficiencies I want to keep seeing on this site, from those who are distinguished experts and contributed to critical systems such as the Linux kernel.
Unfortunately, in the last 10-15 years we are seeing the worst technologies being paraded due to a cargo-cultish behaviour. From asking candidates to implement the most efficient solution to a problem in interviews but then also choosing the most extremely inefficient technologies to solve certain problems because so-called software shops are racing for that VC money. Money that goes to hundreds of k8s instances on many over-provisioned servers instead of a few.
Performance efficiency critically matters, and it is the difference between having enough runway for a sustainable business vs having none at all.
And nope. AI Agents / Vibe coders could not have come up with a more correct solution in the article.
This is basically 3 month old news now.
Related
Datacenters bleed watts and cash – all because they're afraid to flip a switch
Datacenters can significantly reduce energy consumption by 25-50% through enabling power management features, which are often disabled due to performance concerns, without major impacts on performance for most workloads.
Recycled Server Components Bring More Sustainability
Researchers developed GreenSKUs, prototype servers using recycled components to reduce carbon emissions in data centers. They achieved an 8% reduction in emissions, emphasizing backward compatibility for environmental benefits.
Update to Linux kernel could cut energy use in data centres by up to 30%
Researchers at the Cheriton School of Computer Science modified the Linux kernel to reduce data center energy consumption by up to 30%, enhancing network efficiency and optimizing CPU power usage.
Linux kernel could cut energy use in data centres by up to 30 per cent
Researchers at the Cheriton School of Computer Science modified the Linux kernel to reduce data center energy consumption by up to 30%, enhancing network traffic processing and CPU efficiency.
Linux kernel tweak could cut data center power usage by up to 30%
A Linux kernel update (version 6.13) may reduce data center power usage by 30% by optimizing data delivery based on network traffic, allowing automatic switching between polling and interrupt-driven modes.