Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
1–10 of 230 posts
Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#2Currently, the server is primarily used for two things: - Plex Media Streaming (remotely) - Time Machine Backups (locally)
To monitor Plex activities, we access the local Plex API and for Time Machine we simply monitor any file access at /mnt using "lsof." In case there has been no activity for 15 consecutive minutes, the server goes to sleep. (Nobody streams, pausing a video doesn't count as activity, and no backup is running.) A Web server on a Raspberry Pi hosts a website that obtains the current state of the home server provided via the Home Assistant REST API. In case the server sleeps, and I like to backup or stream something, I can wake the server using a simple button press that sends a magic packet using a wakeonlan Perl script.
Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#3Because no desktop OS besides MacOS can handle Sleep with any semblance of competency.
>Why isn't this the default
See above.
Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#4>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.
Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#5Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#6I 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.
Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#7>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 never had any issues with stand-by on Windows.
Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#8Because 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 user has moved the mouse or pressed a key in the last N minutes. And 3) because the delay of waiting for the server to wake back up is undesirable.
>Seriously, there is soooo much potential to save energy in IT.
I don't think so. For VPS instances it doesn't matter, and for internal servers it's almost certainly more efficient to virtualize a bunch of services onto a single box, if there's multiple servers idle most of the time.
Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#9Earlier quoted context omitted.
I've never had any issues with stand-by on Windows.
ah so you're a new windows user
Annoying when it's a laptop that you've just unplugged and stuffed into your backpack, and you're wondering why there's now an oven on your back. Less fatal for a desktop when the goal is to save power.
For linux, sleep/suspend is also pretty reliably good in my experience.
Re: Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
#10For my server, I just focused on choosing very power efficient hardware. I use a passively cooled baytrail SoM.