Live data from Hacker News

Reworking 30 lines of Linux code could cut power use by up to 30 percent

spectrum.ieee.org

51–60 of 123 posts

Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent

#51
post #38

This is really cool. As a high-performance computing professional, I've often wondered how much energy is wasted due to inefficient code and how much that is a problem as planetary compute scales up. 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.

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 doubtful the new implementation was faster.

Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent

#53
post #14

Earlier 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.

Linux is the kernel. Android uses a forked version of the mainline Linux

Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent

#54
post #22

The 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)

Have a link to an article talking about them doing this?

Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent

#55

Earlier quoted context omitted.

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.

Linux is the kernel. Android uses a forked version of the mainline Linux

Everyone uses a forked version of the mainline Linux.

Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent

#58
post #36

Earlier quoted context omitted.

What home router would be busy polling?

Someone who decided to turn their old PC into a router because a youtube video daid "recycling" an old PC is more green despite the massive power suck.

I feel like I'm repeating myself, but there are no people out there running Linux and unintentionally busy polling their network interface. This is something almost nobody does.

Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent

#59
post #5

Linux 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…

So it's not even on by default, it needs to be turned on explicitly?

Re: Reworking 30 lines of Linux code could cut power use by up to 30 percent

#60

This is really cool. As a high-performance computing professional, I've often wondered how much energy is wasted due to inefficient code and how much that is a problem as planetary compute scales up. 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.

Year ago, I posted here that there should be some sort of ongoing Green X-Prize for this style of Linux kernel optimization. It's still crazy to me that this doesn't exist.
Post reply on HN