5 ms·
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 do
by ryao 2y ago
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 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.
- jes5199 2y agoyou don’t have to say “in datacenters” when talking about linux, that is the obvious context in the vast majority of cases
- ptero 2y agoIME majority of linux systems are laptops and desktops.
- jolmg 2y agoWithout looking at stats, I would think android phones.
- billy99k 2y agoAndroid 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.
- hasperdi 2y agoLinux is the kernel. Android uses a forked version of the mainline Linux
- kbolino 2y agoThis means it's not GNU/Linux, but that's not the only flavor of Linux. Alpine uses busybox and musl instead of GNU userland and glibc, but few would say it's not a Linux distribution.
- deleted 2y ago[deleted]
- voidspark 2y agoLinux is a kernel, not an operating system.
- panzi 2y agoIt's Android/Linux, not GNU/Linux.
- homarp 2y agoat least inside docker or wsl
- jonhohle 2y agoDocker wouldn’t be affected by this, the network stack is lower. WSL would, however.
- teeray 2y agoIoT devices would like a word
- panzi 2y agoI'm reading this on an Android phone. The phone OS that has over 70% market share.
- casey2 2y agoLinux is a tiny tiny part of the OS on phones. Power usage is most certainly not handled by android or linux in the vast majority of cases. Who in their right mind would leave something so critical to the success of their product to a general purpose OS designed for mainframes and slightly redesigned for PCs?
- matkoniecz 2y agoWhy you think so? Especially for HN readers decent chunk is using Linux. (I typed this on Linux PC).
- devsda 2y agoAgree. On reading the headline, I was hoping it would extend my laptop battery life.
- ajross 2y agoThis is a naming mistake. You're taking "Linux" in the sense of "Linux Distribution", where the various competitors have seen most of their success in the datacenter. This is specifically a change to the Linux kernel, which is much, much more broadly successful.
- Tireings 2y agoIndeed he has to.
- fnordpiglet 2y agoIt’s a lot more nuanced than that. Being in a data center doesn’t imply heavy network utilization. The caveat is clearly outlined in the article being workload based not deployment based. If you have a home machine doing network routing it would absolutely benefit from this. In fact I would say probably the vast majority of Linux installs are home network devices, just people don’t know it. Embedded Linux machines doing network routing or switching or IPS or NAS or whatever would benefit a lot from this. “Energy savings” can be seen as a green washing statement but on embedded budgets it’s a primary requirement.
- taeric 2y agoI was curious how much this would be applicable to home routers. I confess I'm dubious on major savings for most home users, though? At least, at an absolute level. 30% of less than five percent is still not that big of a deal. No reason not to do it, but don't expect to really see the results there.
- fnordpiglet 2y agoFor embedded it’s not about saving cost it’s about saving limited on board power. The lower the power demand of the device, the smaller and the more you can dedicate to other things.
- taeric 2y agoAgain, no reason not to do this change. I'm not clear it helps in this case, though? The savings is in low use time. During high use time, it is the same, right?
- tuetuopay 2y agoPractically none of it would be applicable (if using a commercial router). They all use hardware offloading, and traffic seldom touches the CPU. Only "logical" tasks are raised to the CPU, like ARP resolution and the likes (what’s called "trap to cpu"). If you’re doing custom routing with a NUC or a basic Linux box, however, this would gain massive power savings because that box pretty much only does networking.
- nottorp 2y agoSo it's not even on by default, it needs to be turned on explicitly?
- eichin 2y agoheh, will this become the equivalent of "in mice" for bio papers?
- casey2 2y agoBut linux use outside datacenters and server farms is irrelevant in terms of power use anyways I don't think anybody would be confused in the context of power usage.
- mmooss 2y ago> The article name is somewhat misleading, since it makes it sound like this would also apply to desktop workloads. The article name is, Data Centers Can Slash Power Needs With One Coding Tweak: Reworking 30 lines of Linux code could cut power use by up to 30 percent The article says, “It is sort of a best case because the 30 percent applies to the network stack or communication part of it,” Karsten explains. “If an application primarily does that, then it will see 30 percent improvement. If the application does a lot of other things and only occasionally uses the network, then the 30 percent will shrink to a smaller value.” It seems you only read the HN title? If so, why bother to critique the article's title?
- RachelF 2y agoI appears that this academic is very good at public relations. 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.