Live data from Hacker News

Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

maximiliangolla.com

11–20 of 230 posts

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#11
post #7

Earlier quoted context omitted.

I've never had any issues with stand-by on Windows.

Windows in particular is notorious as of late for brutally draining the battery while Sleeping[1]. [1]: https://www.youtube.com/watch?v=OHKKcd3sx2c

I thought we were talking about just supporting going to stand-by, not about how much power the device draws while on stand-by.

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#12
post #3

>Why isn't this build into every major operating system by now? Because no desktop OS besides MacOS can handle Sleep with any semblance of competency. >Why isn't this the default See above.

I've spent the last 5 years trying to figure out how to get Macs to remember which display goes on the left when waking from sleep. No luck yet, maybe it's fixed in Ventura or with M2s?

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#13
post #7

Earlier quoted context omitted.

Windows in particular is notorious as of late for brutally draining the battery while Sleeping[1]. [1]: https://www.youtube.com/watch?v=OHKKcd3sx2c

I thought we were talking about just supporting going to stand-by , not about how much power the device draws while on stand-by.

Brutally draining the battery while aSleep should never be called "supporting Sleep".

And even before then Sleep was very hit-or-miss anyway. I've never used Sleep because it's just far too inconsistent and thus unreliable, compared to just shutting the thing down when I don't need it for a while.

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#14
post #3

>Why isn't this build into every major operating system by now? Because no desktop OS besides MacOS can handle Sleep with any semblance of competency. >Why isn't this the default See above.

And because 43 watts is about $200 a year.

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#15

>Why isn't this the default (or at least a configuration option)? Because 1) you still need a second machine to wait for incoming requests, 2) in a server there's no general way to check if the server is serving requests or not. Plex happened to provide an API that specifically does what you needed, but you had to resort to a bit of a hack for Time Machine. This is unlike a desktop context, where you can check if the…

It's also worth mentioning that, by his own admission, OP only managed to save less than 2 euro cents per day (60 / 3360).

Maybe he has different ideas, and that's perfectly fine, but personally I value reliability and uptime far more than 2 cents.

EDIT: I failed at math. See below comments. :V

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#16
post #3

>Why isn't this build into every major operating system by now? Because no desktop OS besides MacOS can handle Sleep with any semblance of competency. >Why isn't this the default See above.

I've spent the last 5 years trying to figure out how to get Macs to remember which display goes on the left when waking from sleep. No luck yet, maybe it's fixed in Ventura or with M2s?

I had a similar problem with identical monitors that I used something called displayplacer

https://github.com/jakehilborn/displayplacer

Later I chained the displays differently and moved the adapters around so it stopped being an issue.

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#18

Interesting solution. I wonder if you could make the 'wake up' a bit more advanced. Run tcpdump or something similar on the Pi, with a filter set for inbound packets to the media server on ports that Plex or Time Machine uses. If it sees those packets, send the WoL magic packet. This might not work if your switch does proper port isolation - but you could perhaps add port mirroring or something like that.

Reverse proxy on the Pi? If a request comes in for the server and x minutes have elapsed since last activity/WoL, send a new WoL.

I'm a little out of my wheelhouse though. Maybe that would only work for HTTP which will not cover Time Machine?

Does Time Machine run on a schedule? Add a cron job (whatever the Mac equivalent is) to send a WoL ~1min beforehand?

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#19
post #13

Earlier quoted context omitted.

I thought we were talking about just supporting going to stand-by , not about how much power the device draws while on stand-by.

Brutally draining the battery while aSleep should never be called "supporting Sleep". And even before then Sleep was very hit-or-miss anyway. I've never used Sleep because it's just far too inconsistent and thus unreliable, compared to just shutting the thing down when I don't need it for a while.

Still, TFA is about putting a server on stand-by. A server is not going to run off a battery most of the time, so it's not very relevant if it's drawing 4 W instead of 1 W. Even if it's not running at the absolute minimum power level, by putting it on any stand-by mode it's going to draw an order of magnitude less power than if it's idle.

Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again

#20
post #2

A Python script that automatically suspends the server, when it is not used, and another script to wake the server up again, in case there is work to do. To my surprise I could not find any out-of-the-box solution, so I thought, it is a worthwhile effort to write about it. Currently, the server is primarily used for two things: - Plex Media Streaming (remotely) - Time Machine Backups (locally) To monitor Plex activit…

I've also heard of a trick of integrating WoL with DNS, where if the server requests a lookup for a local IP, it'd send WoL packets to the destination. You'd probably just need to set the TTL for the server's IP very low so that it doesn't get cached.
Post reply on HN