Live data from Hacker News

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

dgross.ca

121–130 of 244 posts

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

#121
post #33

This looks like one of those home server infrastructure setup rabbit holes I would've bailed out of within the first 10 minutes of Googling to research the problem. I commend the author for their perseverance and the writeup - rabbit hole writeups are their own form of entertainment. That alone was worth it. I could never run anything that looks like such a conceptual pain the butt. A pain to maintain and troubleshoo…

You could have an Arduino to wake the Pi.

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

#122

What would happen if after long period of inactivity the server become a “silent” device i.e. device that does not transmit traffic for extended periods of time because can result in a loss of service binding? These periods of inactivity, thus making the device effectively unreachable (for example for a WAKE-ON-LAN packet) [1]. The diagrams in the article are just gorgeous, can you share the drawing tools being used…

drawings are made with https://excalidraw.com/

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

#124
I'm doing something similar but in a less fancy way: I've got a Hydra server (the NixOS CI thing) set up on a potato-grade SBC with a more powerful desktop computer acting as a builder. The desktop runs a small Go program that I've written that shuts it down after ten minutes of inactivity. Wake-on-unicast for some reason always caused the desktop to start up after just a few seconds of being shut down, so I'm using magic packets. (I'm not sure what's causing this. I suspect Tailscale but I haven't really investigated it.) Hydra connects via SSH so I've added a Match block to the potato's SSH config that sends the WoL packet first:

  Match host desktop.local exec /bla/bla/send-wol
I'm also doing full shutdowns instead of sleeping. The difference is only about ten seconds for a CI job. If the power draw during sleep turns out to be negligible, I might switch to that at some point but first, there are bigger bottlenecks to kill (like Hydra still running expensive evaluations on the potato).

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

#125
post #18

I wonder how many sleep/wake cycles would it take a day to outweigh the TCO decrease of the power bill with the TCO increase of the increased stress/amortization of the hardware, especially HDDs.

Probably a lot. My anecdata: I have had four Seagate HDDs in my desktop PC since 2007 and despite a couple of remapped sectors, they're still working fine.

I often power it on and off 1-2 times a day, and the drives are set to spin down when not in use. The SMART data for these drives shows approximately 37,000 power on hours and 17,000 start/stop cycles. That's about 4 years 3 months of actual power on time, and about 3 power cycles per year over the past 16 years.

The spec sheet says these drives use 8W idle. So:

192 months - 51 months = 141 months of non-use

141 months * 0.730 kilohours / month = 102.93 kilohours

102.93 kilohours * 32 watts = 3293.76 kwh

Assuming 15 cents per kwh, that comes to $494 saved by shutting the drives down over the past 16 years. And I paid $232 total for the drives back in 2007.

Obviously YMMV, just thought it would be fun to calculate :)

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

#126
post #35

Earlier quoted context omitted.

Roughly 40% (and rising) of Google users use IPv6. https://www.google.com/intl/en/ipv6/statistics.html

Without realising and without having had to set it up themselves.

So? The vast majority of IPv4 users also do not realize and did not have to set it up themselves.

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

#127
post #117

Earlier quoted context omitted.

> you can almost go IPv6 only nowadays if you wanted to. I think that is the reason why many aren't enthusiastic about it.

Again, I disabled IPv4 purely for testing reasons , to guarantee nothing was using IPv4 without me knowing it. There’s no reason to actually disable IPv4 as a fallback. Over 99.999% of traffic through my home network is IPv6 now. The tiny remainder that has to use IPv4 does, without issue. 5 months on, and nary a complaint. Just works. The world is ready for IPv6 as your primary, with IPv4 as the fallback.

I understand that. I'm just saying that the people who don't want to try IPv6 aren't motivated by that. For many the calculus is simply functionality divided by effort. They're not configuring IPv6 because it's hard or because it doesn't work. They're not configuring IPv6 because they already use IPv4 and it still works for them.

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

#128
post #33

This looks like one of those home server infrastructure setup rabbit holes I would've bailed out of within the first 10 minutes of Googling to research the problem. I commend the author for their perseverance and the writeup - rabbit hole writeups are their own form of entertainment. That alone was worth it. I could never run anything that looks like such a conceptual pain the butt. A pain to maintain and troubleshoo…

I agree, but you could argue that the Raspberry Pi is not performant enough during restores or browsing the backups. During the backup itself performance should not have to be that big of an issue as it's mostly a background operation you will not be waiting on. You could also use the RPi as a stepping stone which syncs it's files to the 'real' backup server which is on a daily/weekly timer instead of on-demand setup…

Then how about an N95/N100 (recent Celeron successor) mini PC, like the ones from Beelink? They don’t draw that much power, but are 2-3x faster than a Raspi, have HW supported video de/encoding and can even run Windows if you needed that.

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

#129
post #95

> You'll need: An always-on Linux device on the same network as your server, e.g. a Raspberry Pi > First, a bit about my hardware, as this solution is somewhat hardware-dependent: HP ProDesk 600 G3 SFF I seriously doubt any of this can be gotten to work on a Pi in a way that actually reduces power usage in any notable way. Hell the Pi 4 uses almost full idle current when completely powered off unless you turn off jus…

Many people who would do this sort of thing likely already have an always-on pi (pi-hole, dns, ssh jump box, etc). And even at full bore, pi 4 is about 6.5W, so 90% savings over the HP. https://www.pidramble.com/wiki/benchmarks/power-consumption

Ah I think I misunderstood the idea, I thought they were saying you could also use a Pi as the suspended server. That makes more sense I guess.

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

#130
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.

I've just bought a Pi for some always on stuff (like Home Assistant). I wanted to buy a mini-PC but I found it really hard to identify which ones would have low idle power. Did you find a good reference for this?
Post reply on HN