

Could New Linux Code Cut Data Center Energy Use By 30%? (datacenterdynamics.com) 65
Two computer scientists at the University of Waterloo in Canada believe changing 30 lines of code in Linux "could cut energy use at some data centers by up to 30 percent," according to the site Data Centre Dynamics.
It's the code that processes packets of network traffic, and Linux "is the most widely used OS for data center servers," according to the article: The team tested their solution's effectiveness and submitted it to Linux for consideration, and the code was published this month as part of Linux's newest kernel, release version 6.13. "All these big companies — Amazon, Google, Meta — use Linux in some capacity, but they're very picky about how they decide to use it," said Martin Karsten [professor of Computer Science in the Waterloo's Math Faculty]. "If they choose to 'switch on' our method in their data centers, it could save gigawatt hours of energy worldwide. Almost every single service request that happens on the Internet could be positively affected by this."
The University of Waterloo is building a green computer server room as part of its new mathematics building, and Karsten believes sustainability research must be a priority for computer scientists. "We all have a part to play in building a greener future," he said. The Linux Foundation, which oversees the development of the Linux OS, is a founder member of the Green Software Foundation, an organization set up to look at ways of developing "green software" — code that reduces energy consumption.
Karsten "teamed up with Joe Damato, distinguished engineer at Fastly" to develop the 30 lines of code, according to an announcement from the university. "The Linux kernel code addition developed by Karsten and Damato was based on research published in ACM SIGMETRICS Performance Evaluation Review" (by Karsten and grad student Peter Cai).
Their paper "reviews the performance characteristics of network stack processing for communication-heavy server applications," devising an "indirect methodology" to "identify and quantify the direct and indirect costs of asynchronous hardware interrupt requests (IRQ) as a major source of overhead...
"Based on these findings, a small modification of a vanilla Linux system is devised that improves the efficiency and performance of traditional kernel-based networking significantly, resulting in up to 45% increased throughput..."
It's the code that processes packets of network traffic, and Linux "is the most widely used OS for data center servers," according to the article: The team tested their solution's effectiveness and submitted it to Linux for consideration, and the code was published this month as part of Linux's newest kernel, release version 6.13. "All these big companies — Amazon, Google, Meta — use Linux in some capacity, but they're very picky about how they decide to use it," said Martin Karsten [professor of Computer Science in the Waterloo's Math Faculty]. "If they choose to 'switch on' our method in their data centers, it could save gigawatt hours of energy worldwide. Almost every single service request that happens on the Internet could be positively affected by this."
The University of Waterloo is building a green computer server room as part of its new mathematics building, and Karsten believes sustainability research must be a priority for computer scientists. "We all have a part to play in building a greener future," he said. The Linux Foundation, which oversees the development of the Linux OS, is a founder member of the Green Software Foundation, an organization set up to look at ways of developing "green software" — code that reduces energy consumption.
Karsten "teamed up with Joe Damato, distinguished engineer at Fastly" to develop the 30 lines of code, according to an announcement from the university. "The Linux kernel code addition developed by Karsten and Damato was based on research published in ACM SIGMETRICS Performance Evaluation Review" (by Karsten and grad student Peter Cai).
Their paper "reviews the performance characteristics of network stack processing for communication-heavy server applications," devising an "indirect methodology" to "identify and quantify the direct and indirect costs of asynchronous hardware interrupt requests (IRQ) as a major source of overhead...
"Based on these findings, a small modification of a vanilla Linux system is devised that improves the efficiency and performance of traditional kernel-based networking significantly, resulting in up to 45% increased throughput..."
If everyone changes to Linux (Score:3, Funny)
More details (Score:5, Informative)
Re: (Score:1)
They can work out a new coalition agreement before the election.
You may not have noticed, but Singh is trying to distance himself from the Liberal dumpster fire he helped create. A formal coalition would be toxic. That is one thing I'm pretty sure Poilievre has no fear of.
Re: (Score:1)
No, I noticed; the dumbass thought it was time to go for the brass ring and helped the right tear down the Liberals like the NDP is a viable federal government-forming party in this country. Maybe they deserve more votes, but reality is they're not getting them any time soon and their best bet to represent their supporters is in a coalition government.
Re: (Score:2)
the dumbass thought it was time to go for the brass ring
I'm surprised he did not bail sooner.
their best bet to represent their supporters is in a coalition government.
Isn't that what they have been defacto doing for the last several years? It is not just JT we are tired of. Hence my sig.
Re: (Score:2)
the dumbass thought it was time to go for the brass ring
I'm surprised he did not bail sooner.
Why would he? Again, he's been getting lots of what he promised his voters, without having been in power. Once the conservatives are in power - and there's no doubt in my mind Canada will follow in a similar pendulum-swing - the NDP will no longer have any bargaining power.
their best bet to represent their supporters is in a coalition government.
Isn't that what they have been defacto doing for the last several years? It is not just JT we are tired of. Hence my sig.
The funny thing is, for the important things, it's not the Liberals or the NDP, or even Justin Trudeau that "we" are tired of. Many countries are voting out whatever incumbents exist, because the people are... well... kind of uninforme
Re: (Score:2)
Why would he? Again, he's been getting lots of what he promised his voters, without having been in power. Once the conservatives are in power - and there's no doubt in my mind Canada will follow in a similar pendulum-swing - the NDP will no longer have any bargaining power.
I don't disagree, that was as much power as he is likely to ever have and he used it effectively to further his goals. Unfortunately you have to take the bad with the good and the unpopularity of the Trudeau government is also something he gets to share in. Time will tell how much of it he gets to own himself.
The funny thing is, for the important things, it's not the Liberals or the NDP, or even Justin Trudeau that "we" are tired of. Many countries are voting out whatever incumbents exist, because the people are... well... kind of uninformed.
Maybe they just believe, like me, that politicians really are like diapers. I don't really like any of them, but changing them regularly minimizes the damage they can do. The semi-regular flip betw
Re: (Score:2, Interesting)
Don't worry Canada will be the 51st state soon enough and it'll all get fixed.
If Trump tries that there won't be enough left here to be worth taking. Even seniors like me will be taking up arms and becoming cannon fodder, and we'll burn shit to the ground before we'll give it to the Yanks. Outside of hacks like Jordan Peterson and PP himself, and one western province whose name must not be spoken, you have no idea how deep the hatred for Trump is here.
We're polite, eh? But don't fuck with us: https://www.youtube.com/watch?... [youtube.com] . And be sure to check out the comments as well. We may go
Re: (Score:2, Interesting)
There are actually a LOT of Trump supporters where I live. It's disturbing, like these morons don't understand what country they live in. And I'm not in Canada's Texas, either, just not close enough to a major urban core. But it's not so much that there are a lot of them, more that they're compulsively driven to advertise it while the rest of us are just going on with our lives.
And I'd definitely take up arms if the US tried to come north. How the hell do they think they could hold our land against guer
Re: (Score:3)
You keep supporting hateful fascists, I'm fine thanks.
I have no conflict being intolerant of the intolerant. You don't stop a fascist by surrendering to them. You punch them in the fucking face every time you can.
Trump supporters are dangerous whether they're the exploiters at the top or the credulous morons at the bottom. They hurt people, because they want to. There is no space for those kinds of people in civilization.
Re: More details (Score:2)
The fact that you get so upset over something as pointless as politics says more about your mental health than theirs...
Re: (Score:2)
Please ask the people being rounded up and deported just how "pointless" politics is.
Please ask the transgender folks out there how "pointless" politics is.
Please ask the women being forced to carry inviable pregnancies to term at great risk to their own health how "pointless" politics is.
Please ask the witnesses against newly pardoned violent January 6 offenders that have been released how "pointless" politics is while they wonder if they'll face revenge for doing their civic duty of testifying against cri
Re: (Score:2)
THANK YOU for some actual fucking technical details, sorely missing from the posting.
Re: (Score:3)
We will have world peace, eliminate hunger and disease, and all geeks would look handsome
if we lived in Linux philosophy world, we would have all those and more
Re: (Score:2)
"and all geeks would look handsome"
Linus Torvalds is perhaps the most famous legit geek ( or nerd?) of the past several decades and the most he could hope for in Hollywood is to be an understudy for the Penguin, which seems fitting
Re: If everyone changes to Linux (Score:4, Funny)
Also, "sudo make me a sandwich" would actually work.
I don't know about handsome (Score:2)
But Linux has certainly made me more attractive$ to the ladies.
Re: (Score:2)
It's not you that has become more attractive, just your pocket book. Still, that's pretty much the number one criteria for a typical women anyway, so I'm sure you are doing better then average. I hope you are :)
Re: (Score:2)
Wait till they get a load of my employer-provided medical insurance.
Optimisation or cutting corners (Score:1)
Do we have anyone here who could review their proposed code changes and say if it's an actual optimisation, that is a piece of code that increases performance without compromising on functionality, or if they are trying to corrupt the code to make it greener, slower or otherwise inferior to further their green agenda?
Re:Optimisation or cutting corners (Score:5, Informative)
there are two extremes used to deal with application level network traffic use. the normal way which can interrupt applications during high load and lead to poor performance or a busy polling mode which forces the app to use 100% cpu to ensure it doesn't get interrupted.
this patch lets an app do both when it makes sense based on traffic load it's handling. idle/ low traffic is 'normal' mode and in high traffic it behaves like the busy polling mode and this happens dynamically.
sounds like a good thing. the advertised savings is in relation to how often the existing static configs are not needed.
at least that's what i got from the article
Re:Optimisation or cutting corners (Score:4, Informative)
Medium traffic environments which often idle but burst to a few hundred gigabits should use select or poll from the app when idle. Then switch to polled when traffic is bursting.
Low traffic environments should just select/poll
In circumstances where skilled engineers are involved, we would use virtual NICs where each network thread would have its own NIC and use blocking reads which would employ memory mapped I/O and bypass the kernel completely.
Changes like this pull request are always welcome because it helps where unskilled workers are operating the data centers. And this is very common as computer science education is dead. But, I would hope this change would be largely ineffective at Google.
Re: Optimisation or cutting corners (Score:2)
This might actually mean that the impact of this particular patch is even greater as it is disproportionately impact colocation and enterprise DCs that operate far more inefficiently than MAGS hyperscalers (based on PUE)
Re: (Score:2)
The underlying hypervisor environment for big cloud providers wouldn't be affected, no question, but they are having to do some pretty complex stuff.
But, for the servers that they host, a lot of them are stock boxes and making a tweak like this is a win there.
The big wins (and the paper this work is based on discusses this) is user-space networking stacks (as you noted, get the kernel out of the way), but that's really a big change.
Re:Optimisation or cutting corners (Score:4, Insightful)
A quick squizz through the abstract suggests the optimization occurs by deferring IRQs. In other words, the kernel in that case is prevented from doing timely maintenance. Assuming the implementation is safe (runaway buggy processes are still interrupted eventually), the qualitative behaviour of deferring maintenance interrupts would likely be that the system feels more sluggish and unresponsive, with catchup periods when a lot of kernel stuff needs to be performed at once, and more timeout issues.
Re:Optimisation or cutting corners (Score:4, Informative)
It is a simple change and it does work better. Basically, it keeps the underlying IRQ for the network request masked and advises the NIC driver to not to use further hardware interrupts. It then does kernel polling until there aren't any events of interest and then unmasks the IRQ and sleeps.
Now, this is tricky and you can't do this in general, but it does work well in this specific case and seems to be solid enough to be accepted into the mainline kernel.
Re: (Score:2)
Would the change be just as effective (Score:2)
Re:Would the change be just as effective (Score:5, Informative)
I don't think so. The efficiency they are targeting involves processing network packets in large batches. To do that you need a network card that buffers large numbers of packets. You don't find them on a pi.
When you do have a card that buffers lots of packets you get a trade off. You get efficiency by waiting for a long while until a lot of packets arrive and processing them in one batch. But waiting for a lot of packets to arrive could take a long time when there is little traffic, which can create big latencies. Your weapons in this fight are IRQ's, polling, packet counts and time outs. You use time outs and packet counts to intelligently choose whether to use IRQ's, and the polling frequency. This patch introduces a new time out.
Finally the headline 30% is under ideal test conditions. Nobody is likely to see anything like that in real world scenarios, to the point that in any application that isn't a network appliance I doubt the speed difference will be noticeable.
Re: (Score:3)
The reason this is touted as good for data centers is because it's a very specific scalpel for the kinds of workloads datacenters and network hubs see. Tons of traffic. Also, I'd like to add, saving 30% of the power going to a Raspberry Pi is like .. uh, who cares? This isn't about making things faster, it's making computers use less electricity. I have yet to fret about the pennies my Pis are costing me per year.
Let me tell you what's going to happen. (Score:3, Informative)
If performance stays the same afterwards, those companies will implement the energy saving patches. Then, they will use any energy saved to perform even more computing operations and earn more money. What? Did you think they'd sit on all that unused capacity and do nothing about it? In the corporate world everything needs to be milked to its maximum potential.
Re:Let me tell you what's going to happen. (Score:4, Insightful)
Energy reduction argument are always a bit weird. Because, as you indicate, there is some form of induced demand.
Though, if you do decrease cost by 30%, maybe you don't add machines for a while because of the efficiency gains. So the gain come from not adding in the near future. Which is not quite the same; but probably still worthwhile.
Re: (Score:2)
So what I'm reading is I can save on my hardware budget for another year and take that savings as a management bonus? Asking for a friend.
Re: (Score:2)
Well, reducing energy usage is always good. Just don't tell the right about that, because somehow using more power is a good thing.
But for the corporate balance sheet, if it saves 30% of energy usage, that's lowered electricity bills and lowered air conditioning bills, which could mean up to 60% in total datacenter energy savings (usually it's close to 1:1). And what corporation doesn't like to save money?
That's the immediate short term benefit.
The longer term benefit is it may mean the servers have an incr
Re: (Score:3)
So what is wrong with being able to do 43% more work at the same energy cost?
Re: Let me tell you what's going to happen. (Score:3)
Re:Let me tell you what's going to happen. (Score:4, Interesting)
Kernel level networking in servers (Score:2)
Hopefully not an idiotic question, but aside from software firewalls, how much do most servers use the kernel for networking over hardware specific networking. Even most firewalls I have worked with do most of the network operations in silicon.
Re: (Score:2)
Yeah I'm wondering if it's just a rewrite of some small part of iptables... but TFS appears to basically contain the entire "article", so there isn't any real information there.
Re:Kernel level networking in servers (Score:5, Insightful)
I guess I understood this differently, this is not the layer 1-3 stuff that happens in hardware, this is the application layer stuff where userland is getting the data from the network stack, and it sounds at first glance like when an interrupt occurs and the fetching of data starts it changes to a mode where it just keeps fetching data until the network stack runs out of data, at which point it reverts to interrupt driven mode.
Sort of the same philosophy of optimization as keeping http connections alive and reusing them rather than tearing them down and building new ones with every request.
Of course I may have misunderstood it in my superficial glance at the linked patch description, I am not a kernel hacker.
It sounds to me like optimization by reducing redundant overhead, which is a great idea as long as the overhead you are reducing isn't necessary to prevent some other issue, like starving other processes of resources, and it sounds like this patch has implemented time outs to take care of that.
overated (Score:3)
Re: (Score:2)
Cut the AI if they're so concerned with power. (Score:3, Interesting)
This sounds like the same stupid spiel the petroleum industry runs: The answer to [environmental problem] is cutbacks in everything but the thing that really would have the biggest impact.
Re: (Score:2)
Cut the AI if they're so concerned with power
Haven't you heard AI will DOUBLE our lifespans in a decade or 2?
Do you really expect us to risk not being able to work another 90 years at whatever McJobs are left when the robots take over?
All for the purpose of saving a few PWh?
Wait....that doesn't sound right...never mind
Anthropic CEO thinks AI could double human lifespan within a decade [pymnts.com]
Re: (Score:2)
I heard it will turn us into paperclips
Re: (Score:2)
I believe the implication was that we would be about as useful as Clippy
Re: (Score:1)
If you get 30% more networking performance for free, do you say no just because other applications are still energy hungry? When I looked into the comments, I was SURE somebody would come with "what about ... AI?!" even though the topic here is completely unrelated.
Re: (Score:2)
Make all computing more energy efficient! (Score:2, Interesting)
No (Score:2)
But they will be able to run 30% more hardware.
Betteridge has you covered (Score:2)
The answer is : No.
grandstanding (Score:2)
Submit a Pull Request and see if it's accepted or not. Don't grandstand. Thousands of commits per year go into Linux without fanfare.
News at 11. (Score:2)
Reminds me of rumors in the 70s (Score:2)
There were rumors going around that somebody had invented a special carburetor that would make your car get 200 mpg, but the oil companies bought the guy out and killed the product.
This thing sounds like a conspiracy theory in the making!