Live data from Hacker News

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

maximiliangolla.com

61–70 of 230 posts

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

#61
post #15

Earlier quoted context omitted.

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

Ok, the implementation wasn’t very fantastic cost wise. However I still think this could be a big area of improvement. How can we reduce energy usage of servers? There’s a lot of work with ARM lately, I’m curious if that could be used in server workloads like this.

The most effective way is to be able to dynamically distribute load across a large array of servers, turning some off at times of lower load. Anyone who runs a large datacenter probably already does this or something equivalent, either to save money or to service more customers with the same amount of hardware. It's more effective to optimize the hardware architecture, but it's worth noting that improvements in efficiency usually don't translate to reductions in power consumption. Instead, it causes induced demand and usage increases to fill available capacity.

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

#62
If your power management is working right there’s only a slight difference between suspend and the lowest idle power state. I would look into why your thing draws 43W. Common reasons: ASPM disabled, using wired Ethernet when wifi would do the job, and having too much RAM.

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

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

Until a few months ago I would said that Linux handles it well, but not anymore. I can't use sleep anymore because of this bug https://bugzilla.redhat.com/show_bug.cgi?id=2136971

I'm amazed at the regression in this on Linux in recent years. It's a complete coin toss whether sleep will work at all on my laptop, and what state it will be in when I open in again.

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

#65

Is there something that puts my server to sleep at a particular time and then wakes it back up at a particular time? This is what I've been looking for but can't find anything..

A combination of rtcwake[1] and cron might work.

[1] https://manpages.debian.org/buster/util-linux/rtcwake.8.en.h...

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

#66

Heh, my homeserver uses about that much (4W) in idle ;) 2 SSDs, 8 GB RAM and a passively cooled J4125, more than enough for what I need (2-person household). It also runs Home Assistant, so I can’t let it go to sleep, anyway. I have an extra Pi4 with Proxmox Backup Server, that could actually sleep most of the time as it backups only twice a day. But even with German electricity prices, a Pi4 with a single SSD is not…

Indeed, modern hardware is getting ridiculously efficient, and if you go the extra mile to disable hardware you don't use, as well as strip your configuration to run only the software you absolutely need, you can really drive it into the ground.

The later hardware revisions (such as 1.5) of the Raspberry Pi 4B, even with 8GB of memory, can idle at ~1.33W on WiFi with everything unnecessary disabled -- 2GB versions are close to 1.1W. The 8GB version on power-hungry Ethernet (at 100Mbps) can actually be under 1.45W, compared to 1.68W for 1Gbps. PoE is nice, but the hat adds a lot of power -- though it's possible with an 8GB to squeak under 2W via PoE at 1Gbps, though only just barely (~1.98W).

-- -----

For those who go, "but I need real power"... you can have an 8-core Ryzen 7 PRO 5750GE (with GPU cores for transcoding), 64GB of memory, multi-TB NVMe SSD, and two NICs (one 1GbE and one 2.5GbE) plus WiFi and Bluetooth idle at under 9W. No, it's not 4W, but to say it can do nearly anything you can imagine is an understatement. You're at the same CPU performance of an i5-12600, with tons of memory for VMs galore, in a system that has the same idle power as a cable modem.

I believe Apple rates the newest Mac Mini with an M2 Pro, 32GB memory and 2TB SSD at just 7W idle. Again, given it's capability, that's pretty wild for 7W.

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

#67

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.

Perhaps using something like keepalived on your server and Pi could be useful here. When the server is off the ip will failover to the Pi to receive server traffic to know when to power on the server. Once the request comes in and the pi powers on the server, it'll come active again and recieve the IP while the pi goes in to standby. That way the Pi doesnt need to be in the read or write path.

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

#68
post #58

Earlier quoted context omitted.

Reverse proxy means that your pi now has to handle all the traffic for Plex and any other services. It could also make other things difficult like CIFS/whatever else you're hosting. Depending on what Pi you're using, it's networking is over USB, and so is quite performance constrained.

Maybe use local DNS with a very low TTL. Send WOL on DNS request.

If we're talking about Plex, then local DNS is probably not going to help.

The traffic could be coming in via your WAN connection and your router is just going to forward it to an IP.

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

#69
post #66

Heh, my homeserver uses about that much (4W) in idle ;) 2 SSDs, 8 GB RAM and a passively cooled J4125, more than enough for what I need (2-person household). It also runs Home Assistant, so I can’t let it go to sleep, anyway. I have an extra Pi4 with Proxmox Backup Server, that could actually sleep most of the time as it backups only twice a day. But even with German electricity prices, a Pi4 with a single SSD is not…

Indeed, modern hardware is getting ridiculously efficient, and if you go the extra mile to disable hardware you don't use, as well as strip your configuration to run only the software you absolutely need, you can really drive it into the ground. The later hardware revisions (such as 1.5) of the Raspberry Pi 4B, even with 8GB of memory, can idle at ~1.33W on WiFi with everything unnecessary disabled -- 2GB versions ar…

> For those who go, "but I need real power"

I think those usually also want real storage space, NVMe either can’t offer that, or it would make the build so expensive, electricity stops mattering. And in those cases, 4-12 24 TB HDDs will out-consume your other hardware anyway ;)

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

#70
Smartphones can be connected for days on the internal battery, using well under a watt, and they can be ready to respond instantly, and they have an app container system that makes everything just work.

I really think we need to start making Android servers a thing, at least for self hosting, maybe for everything.

Judging by how WearOS seems to be able to run on 35mA or less, I think there's a good case for just making an open fork of Android with similar optimizations, and putting it on literally everything resembling a smart device. I wouldn't be surprised if some kind of Android for Devices comes out someday, assuming Fuschia doesn't ruin the party.

Post reply on HN