Does this mean that "adaptive interrupt mitigation" is no longer a thing in the kernel? I haven't really messed with it in ~15+ years, but it used to be that the kernel would adapt, if network rate was low it would use interrupts, but then above a certain point it would switch to turning off interrupts and using polling instead. The issue I was trying to resolve was sudden, dramatic changes in traffic. Think: a loop…
Adaptive IRQ moderation is a hardware feature. https://edc.intel.com/content/www/us/en/design/products/ethe...
Reworking 30 lines of Linux code could cut power use by up to 30 percent
101–110 of 123 posts
Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#102One thing I didn’t see mentioned here yet: a lot of high-performance data center workloads don’t actually go through the Linux kernel’s network stack at all. 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…
Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#103Linux added a busy polling feature for high performance networking. Most Linux software does not use it, but software used in datacenters (e.g. by CDNs) that does use it makes the system very energy inefficient when things are not busy. This patch gives the the kernel the ability to turn that off when not busy to regain energy efficiency until things become busy again. The article name is somewhat misleading, since i…
They mix interrupts and polling depending on the load. The interrupt service routine and user-kernel context-switch overhead is tiny computationally and hence in power usage.
Also, most network hardware in the last twenty years has had buffer coalescing, reducing interrupt rates.
Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#104Earlier quoted context omitted.
Without looking at stats, I would think android phones.
Android isn't Linux. While Android uses the Linux kernel, it's not a standard Linux distribution. It has its own user space and libraries, making it a distinct operating system.
Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#105Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#106Earlier quoted context omitted.
Absolutely. It is unfortunate that many software engineers continue to dismiss this as "premature optimization". But as soon as I see resources or server costs gradually rising every month (even on idle usage) costing into the tens of thousands which is a common occurrence as the system scale, then it becomes unacceptable to ignore.
When you achieve expertise you know when to break the rules. Until then it is wise to avoid premature optimization. In many cases understandable code is far more important. I was working with a peer on a click handler for a web button. The code ran in 5-10ms. You have nearly 200ms budget before a user notices sluggishness. My peer "optimized" the 10ms click handler to the point of absolute illegibility. It was doubtf…
Most commonly, If the costs increase as the users increase it then becomes an issue with efficiency and the scaling is not good nor sustainable which can easily destroy a startup.
In this case, the Linux kernel is directly critical for applications in AI, real time systems, networking, databases, etc and performance optimizations and makes a massive difference.
This article is a great example of properly using compiler optimizations to significantly improve performance of the service. [0]
[0] https://medium.com/@utsavmadaan823/how-we-slashed-api-respon...
Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#107Earlier quoted context omitted.
There should have been an off switch from the beginning though IMO, though perhaps there already is? But the number of corporates messing with the kernel for their own purposes greatly outnumbers the number of independent developers. That gives big tech a big influence. And the Linux Foundation is there to cement that influence. I much prefer grassroots projects. Made by and for people like me <3 That's why I moved t…
Uh Linux is a grassroots project, quite unlike Berkley Software Distribution. Also no you are entirely unaffected by this unless you use a very specific and uncommon syscall.
Like others have mentioned, it's just a huge deal in the data center now. With that comes a lot of influence by corporates interests.
Whereas BSD has gone the opposite way. Started by Berkeley but abandoned to the community. Business is not really interested in that because anything they contribute can be used by anyone for anything (even their competitors can use it in closed source code). Netflix was the biggest user but I don't think they contribute anymore either. WhatsApp used it until Facebook acquired them. That leaves netgate and ix systems which are small. Netgate pushed a really terrible wireguard once but it was nipped in the bud luckily. https://arstechnica.com/gadgets/2021/03/buffer-overruns-lice... It also highlighted many trust issues which have been improved since.
Of course whether this is an issue for you is very personal. For me it is but clearly for a lot more people it isn't, as Linux is s lot more popular.
Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#108The flip side of this is meta having a hack that keeps their GPUs busy so that the power draw is more stable during llm training (eg don't want a huge power drop when synchronizing batches)
Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#109Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent
#110Earlier quoted context omitted.
There should have been an off switch from the beginning though IMO, though perhaps there already is? But the number of corporates messing with the kernel for their own purposes greatly outnumbers the number of independent developers. That gives big tech a big influence. And the Linux Foundation is there to cement that influence. I much prefer grassroots projects. Made by and for people like me <3 That's why I moved t…
Uh Linux is a grassroots project, quite unlike Berkley Software Distribution. Also no you are entirely unaffected by this unless you use a very specific and uncommon syscall.