Live data from Hacker News

Making a Linux home server sleep on idle and wake on demand – the simple way

dgross.ca

211–220 of 244 posts

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#211
post #65
post #3

Another option, if your needs are relatively modest, is to choose a low power mini PC. The one I chose idles at around 5W under Linux before any tweaking. It is based on the Intel N5105. I have a few 2.5” external HDDs attached for backup which are configured to sleep after a short time.

Low powered pcs are the way to go for self hosting. Lots of great options that sip power at idle (most of the time) Desktop grade cpus can be found that max at 35W. The power per watt of sa

Completing the sentence above

Cpu-Power point per watt is what you're after.

And then, electricty cost per watt-point.

8th gen intel and above cpus are quite perfect for this, they often have hyperthreading and vPRO built into an enterprise/military grade box for hundreds and have near perfect linux support out of the box, whether it's Lenovo, HP, Dell, etc.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#212
post #197

Earlier quoted context omitted.

There are a lot of low power media boxes but few servers sadly. By server i mean multiple network ports and storage ports, space in the case for several spinny discs in addition to the ssds etc. I doubt any NUC is good for a server by my definition.

Sure there are, there are lots of NAS appliances boxes from the likes of Synology/QNAP/Aliexpress Special that can run double duty as servers built on similar low power CPUs. Some of them even have decent networking options. The problem is that a lot of the commercial products are woefully underspecc'ed for the price and you outgrow them quickly. Spinning disks also eat a lot of power, relatively speaking, so they ki…

> lots of NAS appliances boxes

Rather roll my own Linux thank you.

> Some of them even have decent networking options.

I think few of them have multiple ethernet ports. Plus there's the matter of how much cpu the built in ethernet eats.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#213

> Disable IPv6: this approach relies on ARP, which IPv6 doesn't use I wish more people would care about IPv6.

I wish I could care about IPv6 but I've never used it, my ISP doesn't provide it and I've never once seen it deployed in a business environment

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#214

I just let my computer run all the time. Disable all sleep functionality except monitor sleep. Then it always works when I need it to. My life is way too short to fool around with stuff like this to save $5 in electricity and have to deal with the inevitiable "won't wake up" or "wakes up in a brain-damaged state" situations.

I do this too. I'm on a Mac and use an app called "Amphetamine" to keep the machine active (it's the successor to "Caffeine" IIRC).

However, I dim the screen to black when I go to sleep, since it's the only component that can't really "idle" - it's consuming power as long as it's displaying pixels, and thus it would also be the first component to die from overuse even while "idling."

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#215
post #3

Another option, if your needs are relatively modest, is to choose a low power mini PC. The one I chose idles at around 5W under Linux before any tweaking. It is based on the Intel N5105. I have a few 2.5” external HDDs attached for backup which are configured to sleep after a short time.

Honestly, this is the right answer. I have a HP ProDesk 300 G3 mini (the mini version of the server the OP is using) running home assistant, syncthing, a bunch of other random 24x7 stuff, and the "server", router, and PoE switch powering two Wifi APs is drawing a grand total of 9 watts*. It just doesn't seem worth the effort to try and make this more efficient.

* According to the UPS.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#216

This feels like the sort of functionality that ought to just work now. Its a clearly useful thing for PCs all over the planet and it would be nice if they just went to sleep almost completely when idle and woke up on network or USB/PS2 input. The power savings would be enormous. Yet today I still have issues with power saving features, performance is lowered by having power saving on instead of flat out and various t…

The main problem is defining what it means to be idle. Suppose you have some browser tabs open, so there is some javascript running to switch out the ads on the page every few seconds. Is that "idle"? There's CPU and network activity. Suppose there is an open ssh connection to a server. It sends keepalives because the client is remote and behind a NAT, but there is no "real" activity. Should the server go to sleep? I…

This sounds like something that can be defined at an arbitrary point by a committee.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#218
post #197

Earlier quoted context omitted.

Sure there are, there are lots of NAS appliances boxes from the likes of Synology/QNAP/Aliexpress Special that can run double duty as servers built on similar low power CPUs. Some of them even have decent networking options. The problem is that a lot of the commercial products are woefully underspecc'ed for the price and you outgrow them quickly. Spinning disks also eat a lot of power, relatively speaking, so they ki…

> lots of NAS appliances boxes Rather roll my own Linux thank you. > Some of them even have decent networking options. I think few of them have multiple ethernet ports. Plus there's the matter of how much cpu the built in ethernet eats.

> Rather roll my own Linux thank you.

Most modern NAS have that option. It just doesn’t make that much sense since that would get rid of the (in some cases really good) DSM.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#219

This feels like the sort of functionality that ought to just work now. Its a clearly useful thing for PCs all over the planet and it would be nice if they just went to sleep almost completely when idle and woke up on network or USB/PS2 input. The power savings would be enormous. Yet today I still have issues with power saving features, performance is lowered by having power saving on instead of flat out and various t…

It's not really worth it, even though I'd commend the OP for wading through the WoL stack. I have a NAS that's running 8 drives and a modern Intel CPU and it runs around 40w from the wall under load, and idles <10W with the drive spun down and CPU not doing anything. The WoL setup made more sense 5-10 years ago when power save functionality was much more primitive and drives were way less efficient.

It's also a solved problem for the vast majority of the population. You pay Apple or Google a few dollars a month and they handle backups for you. Those servers aren't sitting idle 99% of the time waiting for you to backup so there is no wasted power. Self hosting is fun but not the most practical option. And now iCloud has end to end encryption, there is little reason to bother doing it yourself.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#220
post #197

Earlier quoted context omitted.

Sure there are, there are lots of NAS appliances boxes from the likes of Synology/QNAP/Aliexpress Special that can run double duty as servers built on similar low power CPUs. Some of them even have decent networking options. The problem is that a lot of the commercial products are woefully underspecc'ed for the price and you outgrow them quickly. Spinning disks also eat a lot of power, relatively speaking, so they ki…

> lots of NAS appliances boxes Rather roll my own Linux thank you. > Some of them even have decent networking options. I think few of them have multiple ethernet ports. Plus there's the matter of how much cpu the built in ethernet eats.

You should actually look at what's available. You can get a QNAP box with an ARM CPU with lots of drive slots, dual 2.5 gig Ethernet and dual 10 gig SFP+ for like $700, among many more examples. Sure saturating those is gonna eat a ton of cycles and run like shit but... yeah of course it is it's a cheap low power CPU. They suck for the sorts of stuff I wanna do, but this is inherently a market segment that involves compromise and that is probably perfect for some people.

I agree I'd much rather roll my own system (and that's what I did) and I would personally never buy one of those, but it's simply not right to say there are no options available if you want a low power server off the shelf. Some of them are even decent if you wanna pay for it.

Post reply on HN