Live data from Hacker News

Making a Linux home server sleep on idle and wake on demand (2023)

dgross.ca

71–80 of 115 posts

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#72
post #63

Earlier quoted context omitted.

Ah, you're not a tinkerer!

I definitely am. But this is a very solved problem. It just adds brittleness to the system. Maintenance for this is going to suck. It's going to break in less than a year because you forgot to set a static IP address, or a Python library changes, or the SD card in the PI gets corrupted, or the jack on it fries, or its cheap PSU died and fries the board, etc. Then you're going to have to try to remember how the damn t…

I do agree that it would be nice if no external device would be needed. It does make me wonder if the Pi is truly needed. I'll be looking into this myself as well, I also have power hungry servers that are mostly idling and would benefit from WoL. In some EU countries, energy prices are truly a scam.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#73
post #6

Earlier quoted context omitted.

I use a Mac Mini. When nothing it up, it draws like 7W!

How do you accurately measure how much current a PC is drawing at any given time? Do you have some kind of measurement device inline with the power cord?

Yes, I have one of those for my homelab. I draw about 200W on average, but it can spike to about 1000W.

https://www.brennenstuhl.co.uk/en-GB/products/travel-adapter...

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#74
I considered doing something like that but eventually I went for the simpler solution of plugging my little servers into smart plugs. I shut them down, then power off the plug over wifi. I start them by powering on the plugs. The plugs draw very little power. The servers are ARM SoC and draw 1 to 4 W. One of them has an HDD that draws about 10 W but I can unmount and power off it when I don't need that disk and I still need the server on (it's also got a SSD.)

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#75

Some motherboards disable power to their ethernet port upon sleep and so WoL will not work. This is particularly common if the NIC is a power hungry 10GbE port. However, in the particular case I found, the motherboard also disables oower to any usb GigE adapter attached. The solution I found was to attach a USB hub with (empty) SD slots and integrated GigE port. As SD cards require power to remain mounted, the mother…

This reminds me of the empty box in a corner of the workshop with the written note "Don't remove!".

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#76
post #63

Earlier quoted context omitted.

Ah, you're not a tinkerer!

I definitely am. But this is a very solved problem. It just adds brittleness to the system. Maintenance for this is going to suck. It's going to break in less than a year because you forgot to set a static IP address, or a Python library changes, or the SD card in the PI gets corrupted, or the jack on it fries, or its cheap PSU died and fries the board, etc. Then you're going to have to try to remember how the damn t…

> Then you're going to have to try to remember how the damn thing works

Fortunately, the author wrote a derailed essay explaining all of this…

> You should never add more failure points to infra, ever.

Every time you add a new system or a new feature you necessarily “add more failure points”, there's no way around that.

One should avoid introducing more failure points than needed for the functionality you want, that's it.

You say it's a “solved problem”, but you only give solutions to a different problem (starting the server at a scheduled time, when the author wants to start the server on demand).

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#77
Thank you for the post, very informative. I do this half manually. I have a cgi script on the always on very power efficient sbc server that wakes up the bigger server if someone needs it. The big server powers itself down when no backup is running at a time everybody using the server usually sleeps. I thought about improving this and measure server usage and solar power generation to decide the shutdown, maybe with an additional warning email. for example: "The server shuts down in 5 minutes due to no demand and no solar power, if you want to prevent this click this link: http://server.lan/cgi-bin/keepalive "

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#78
post #12

All this complexity to save a few bucks per year on your electricity bill? This is ridiculous, the Pi costs far more than what you can be expected to save.

The complexity in TFA is due only to author's desire to not use magic packets for waking the server, making thus the state of the server transparent for users.

If you are willing to send magic packets to wake up the server, before using it, you can save money from the electricity bill with negligible complexity.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#79
post #3

That's what I was thinking too. My home server consumes like 15 W and is silent. If you get a rack mounted server made for data centers and stick it in a closet so you can't hear it then yes, i guess this approach makes sense.

In the UK, every 10W of 24/7 load is ~£25/year (33 USD). It’s very easy for even the small things to add up.

In contrast to many common consumer subscriptions which start at double that it seems like decent value.
Post reply on HN