18 ms·
Saving Energy: Home Server That Automatically Suspends to RAM and Wakes Up Again
- blindriver 4y agoIs 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..
- RealStickman_ 4y agoA combination of rtcwake[1] and cron might work. [1] https://manpages.debian.org/buster/util-linux/rtcwake.8.en.html https://manpages.debian.org/buster/util-linux/rtcwake.8.en.h...
- FpUser 4y agoOuch what a prices.
- root5 4y agoA 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 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. GitHub: https://github.com/m33x/wol-plex-server https://github.com/m33x/wol-plex-server
- jessikat 4y agoI'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.
- Dalewyn 4y ago>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.
- deadbeeves 4y agoI've never had any issues with stand-by on Windows.
- booi 4y agoah so you're a new windows user
- paranoidrobot 4y agoThe majority of Sleep/Suspend/Hibernate related issues I had on Windows were related to it either not sleeping at all, or waking up at the wrong time. 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.
- Dalewyn 4y agoWindows in particular is notorious as of late for brutally draining the battery while Sleeping[1]. [1]: https://www.youtube.com/watch?v=OHKKcd3sx2c https://www.youtube.com/watch?v=OHKKcd3sx2c
- deadbeeves 4y agoI thought we were talking about just supporting going to stand-by, not about how much power the device draws while on stand-by.
- Dalewyn 4y agoBrutally 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.
- paranoidrobot 4y agoInteresting 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.
- JesusLovesEwe 4y agoReverse 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?
- deadbeeves 4y ago>Does Time Machine run on a schedule? Add a cron job (whatever the Mac equivalent is) to send a WoL ~1min beforehand? I believe on x86 the BIOS supports setting a timer for self-wakeup. The OS can tell the BIOS "I'm going to sleep. Pull me out of sleep if the RTC passes this datetime."
- dicknuckle 4y agoOf all the x86 type BIOS and EFI, I've never seen one that didn't support that. Even thinclients and things you'd expect to leave that feature out.
- Zardoz84 4y agoI see BIOS not supporting it back in the 90's
- paranoidrobot 4y agoReverse 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.
- deadbeeves 4y ago>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 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.
- Dalewyn 4y agoIt'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
- sokoloff 4y agoAbout 41 euro cents per day->57€/140 3360 is the number of hours in 140 days.
- Dalewyn 4y agoYou are, in fact, correct. I have no idea why I converted 140 days into hours... Still, my point remains unchanged: I, at least, value reliability and uptime more than ~43 euro cents.
- judge2020 4y agoAnd doing this is not going to largely affect the energy usage of the EU - at least, in comparison to, say, Dell putting Platinum rated PSUs in their workstations and AMD making good server chips that are twice as efficient at the same performance point as Intel's chips.
- sgtnoodle 4y agoThanks to Valve's focus on improving Linux suspend on AMD hardware, suspend recently started working reliably on my desktop. It now suspends automatically, and I set up a button on my phone to send a wake-on-lan packet. My phone is always VPNed to home, so I can wake it up from anywhere. For my server, I just focused on choosing very power efficient hardware. I use a passively cooled baytrail SoM.
- blamazon 4y agoWow, 49 euro cents per kWh is roughly four times as much as I currently pay in south-east USA! I will not complain about my next utility bill. Blessed be the nuclear plants and considerable quantities of pumped storage near me.
- metadat 4y ago€0.49 / kWh is an insanely high price for electricity. Here in the US in Cali, $0.32 / kWh is considered a steep price. I've heard the price in Oregon is $̶0̶.̶0̶2̶ ̶/̶ ̶k̶W̶h̶ $0.20 / kWh. What gives.. why can't electricity be delivered less expensively / more economically in Germany? Edit: Thanks for the corrections regarding Oregon, makes me feel a little better about the situations elsewhere. :)
- taspeotis 4y ago> why can't electricity be delivered less expensively in Germany? https://www.reuters.com/business/energy/moscows-decades-old-gas-ties-with-europe-lie-ruins-2023-02-14/ https://www.reuters.com/business/energy/moscows-decades-old-...
- LinuxBender 4y agoOregon is 11.9c/kWh [1] Still not bad. [1] - https://www.eia.gov/state/print.php?sid=OR https://www.eia.gov/state/print.php?sid=OR
- bpye 4y agoI'm in BC and BC Hydro has two step billing. $0.0950/kWh for the first 1350kWh/2 months and $0.1408/kWh beyond that [0] - and that's CAD so about $0.071/kWh and $0.11/kWh in USD. I'm guessing you meant $0.2/kWh for Oregon? I'm definitely less concerned about the cost of running a machine 24/7 here than I was back in the UK. [0] - https://app.bchydro.com/accounts-billing/rates-energy-use/electricity-rates/residential-rates.html https://app.bchydro.com/accounts-billing/rates-energy-use/el...
- rahimnathwani 4y agoI live in Northern California, in the PG&E service area. I pay something like $0.35/kWh in the evenings, and more during the day. (It's a bit confusing to calculate the rate, as for some reason the bill has separate sections for 'generation' and 'delivery'.)
- metadat 4y agoWe know why we can't have cheap and efficiently delivered power in California: PG&E has no incentive to deliver such a product. My solution is to run my servers and live life as I please (within some degree of reason), and not look at the power bill too often. In my experience, the monthly charges don't correspond with my actions attempting to reduce or increase consumption in specific categories (e.g. hottubs, servers). With that said, I do flip off the lights when not in use :p
- ndriscoll 4y agoHave you checked your settings with powertop? Apparently some hardware has broken power management, but if yours doesn't, you might be able to get most of that savings from just making sure all of your power management settings are on (there may be BIOS settings to adjust too).
- mrmekon 4y agoI wrote something remarkably similar a few years ago, for similar reasons. I was pretty baffled that nothing similar already existed. Auto-wake with the RTC timer was what I really wanted. Link, in case you care: https://github.com/mrmekon/circadian https://github.com/mrmekon/circadian I have a "NAS", which is really an enormous desktop tower crammed full of hard drives. It auto-wakes once per day, pulls backups from my various servers all over the place, then returns to sleep.
- compumike 4y agoDid not know about /sys/class/rtc/rtc0/wakealarm — thanks!
- 5d41402abc4b 4y agohttps://linux.die.net/man/8/rtcwake https://linux.die.net/man/8/rtcwake
- kristianpaul 4y agoWhy not just run servers in low consumptions cpu architectures anyway?
- gravypod 4y agoI built something similar to this to turn on / off a windows gaming PC when I first made my switch to 100% full Linux on my main computer: https://github.com/gravypod/SteamStreamScripts https://github.com/gravypod/SteamStreamScripts There's a huge amount of savings in energy to be had from automatically sleeping + WOLing PCs.
- MBCook 4y ago43 watts idle seems quite excessive. A M1 Mac Mini idles at 7 watts. One of the older Intel models (not the last one) would do 6 watts. The author achieved some impressive savings, but I wonder how much lower it could go with a more efficient machine. (Obviously that costs money and the article’s technique is free)
- rektide 4y agoThe one-liter mini-pc's are incredibly abundant & cheap on tbe used market. They mostly idle.under 10w. I had some acer chromeboxes that were converted to linux, & those things idled at 5w! had em filled with 32gb ram. amazing little machines. the little i3 and celeron cpus were very weak but still held up well. had almost two years where i used one as my main desktop, literally velcroed to my monitor, but eventually decided the somewhat subpar perf (especially at 4k!) was a bit of a drag.
- MBCook 4y agoThe mini is just what I thought of off the top of my head and I know it performs well. I fixed my post to put the 6 digit I forgot in the Intel mini specs. You bring up a good point. Some of those little NUC boxes are really low. And a modern Raspberry Pi (if you can find one) is too. Lots of options.
- djhworld 4y agoI bought a Lenovo M900 Tiny a few months back which is quite a few years old (think maybe 2017?) and upgraded it to 24GB RAM, 120 GB SSD and 500GB nvme. With proxmox and a few vms running on there it idles around 11-12W which isn't raspberry pi levels of efficiency but still pretty decent. I think the OP's server may have one or more mechanical HDDs in it that are consuming most of the power.
- deleted 4y ago[deleted]
- rektide 4y agoi'd love to try to turn a server on every 30s for like 2s then turn it off again. rtcwake could be used for this. dont spin up your platter drives each time though or you might wear em out fast. the tricky part is that a consumer would have to catch you at just this time. a mdns broadcast being a signal- contact me now- would work, but what apps are going to have that kind of timing built in? it'd be interesting to see which kinds of protocols would be ok with servers that just keep disappearing. webdav might be fine. smb/cifs would probably throw a fit. or... ideally the nic could be some kind of smartnic that could stay on & buffer some traffic, keep connections open. i wonder if cxl gear, with multi-host capabilities, might enable this sort of thing.
- Semaphor 4y agoHeh, 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 exactly expensive. Still, maybe I’ll look into that.
- MrFoof 4y agoIndeed, 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.
- Semaphor 4y ago> 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 ;)
- 4y ago
- wackget 4y agoMost BIOSes have an option to "Wake on LAN" or "Wake on Magic Packet" which will allow you to wake the computer via a network message. On Windows you can use WakeMeOnLAN: https://www.nirsoft.net/utils/wake_on_lan.html https://www.nirsoft.net/utils/wake_on_lan.html `WakeMeOnLAN.exe /WakeUp [name]`
- jeffbee 4y agoIf 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.
- mrtweetyhack 4y ago[dead]
- eternityforest 4y agoSmartphones 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.
- simongray 4y agoRaspberry Pis (and similar devices) already work great as low-power servers. The big issue is the home server community being overly focused on creating "battle stations" that look cool and run 40 different Docker containers rather than simple low-power solutions.
- pydry 4y agoYou can very quickly run up against resource constraints with a raspberry pi.
- adrianN 4y agoYou can also run against resource constraints with a smartphone.
- eternityforest 4y agoPi doesn't work that great, power consumption is still several watts, too much for batteries to be cheap and compact if you want a day or two of backup, plus self hosting in general is very much enthusiasts only. Android does what Docker does while remaining very low power, because it gives you one standard API level, rather than some minimal syscalls and you have to bring all your own libraries right in the container.
- corv 4y ago
- guluarte 4y agoIm using a mini pc with 8gb ram and 2tb ssds, it uses around ~5w and can run proxmox, docker, portainer, home assistant, adguard, tailscale, plex, etc
- dugite-code 4y agoYou don't even need magic packets from a dedicated machine for wake on lan for some NIC's. For example on linux using `ethtool -s enp3s0 wol pug` will wake the system on p (PHY activity), u (unicast activity) and g (magic packet activity). Of course this is entirely dependent on how "noisy" your network is. This is something I've been thinking about for some time as I'm working on re-building my homelab for a more powerful system with more storage. On of the big things I'm trying to find out is if there is a good way of truly shutting off hard drives when not in use or if the hit to longevity of the drives would be too much. source https://wiki.archlinux.org/title/Wake-on-LAN https://wiki.archlinux.org/title/Wake-on-LAN
- Youden 4y agoI've been shutting off my hard drives but found that anything short of unmounting them caused them to be awoken frequently by random processes with timer-based disk access. My solution was to move all my online use-cases to a separate SSD and mount the HDDs only when I need them for a manual process. E.g. when I want to watch a movie I have downloaded, I'll mount the disk pool and copy it to the SSD (although my internet is fast enough that just downloading it again is usually faster than the manual process).
- bombolo 4y agoI was doing it and it worked fine. But I'd just keep the served content on the disk. Of course not /var.
- varenc 4y agoThis general concept is very similar to Apple’s Bonjour based “Sleep Proxy” service. Basically, if you have an Apple TV or something similar it will automatically wake up a sleeping device when someone requests its services. SSH or media sharing for example. While a device is sleeping the proxy will keep advertising its services via Bonjour. Low power always-on Apple devices are sleep proxies by default but you can turn any Mac into a Sleep Proxy by passing a flag to mDNSResponder. More details: https://en.wikipedia.org/wiki/Bonjour_Sleep_Proxy https://en.wikipedia.org/wiki/Bonjour_Sleep_Proxy
- gotschi_ 4y agoI kind of made a general purpose sleep proxy myself a few years ago with a apache and some cgi scripts getting triggered when I visit my /jellyfin or /guacamole It just listened to the fixed routes, woke the server and proxied the page when finished (sometimes took 2 loads) But basically is the same as in the arzicle except I didn‘t need to manually WOL anything and my server just went to sleep by itself
- 314 4y agoThis is a nice idea, I was jsut wondering how to do that. Another approach (if it is supported by the adaptor) is to configure WoL so that it does not need a magic packet. Some adaptors can be configured to wake on any "directed packet". I have a linux server sitting downstairs that I might play around with. It would be nice if the sleep support featured a timer and integration with the system cron daemon. Then it could wake on a directed packet or when there is a scheduled task.
- varenc 4y agoInteresting! I believe all the new Mac products also work like this. While sleeping a Mac will still stay on WiFi if it’s on a power adapter and the sleeping M1/M2 Macs stay on WiFi even while on battery. They also still respond to some mDNS traffic. When I try to access certain services on a sleeping Mac, like SSH, it’ll immediately wake up. Even port scanning with `nmap -p 22 <ip>` will cause a wake up. That sounds like the wake on “directed packet” thing? In practice I think this mostly obviates the need for a Bonjour Sleep Proxy. Also, fun tip: You can easily check if a Mac on the network is sleeping or not based on its ping response TTL. While awake it uses a TTL of 64 but while sleeping it uses a TTL of 32. You can use this little signal to roughly keep a log of when the Macs on your network are awake vs sleeping. (Not too much of an actual privacy concern I think)
- pmontra 4y agoI use an Odroid HC4 (two SATA 3 slots) powered by a Shelly smart plug. My backup script powers the plug with a HTTP call. Waits for the server to be online by repeated ssh attempts. Unlocks the backup disk by asking me the LUKS password. Starts the backup. Sshs to the server to shut it down. Polls the plug over HTTP until the power meter shows a less than one Watt consumption for a while. Eventually powers off the plug, HTTP again. The backup procedure includes a remote encrypted mirror. Power consumed between backups: zero plus the smart plug.
- wasneverhere 4y ago"Unlocks the backup disk by asking me the LUKS password." <- have you taken a look into https://opensource.com/article/20/11/nbde-linux https://opensource.com/article/20/11/nbde-linux
- aequitas 4y agoIf you're penny pinching also have a look at your network equipment. As a test I set all switch ports on my 24 port HP from 1Gbps to 100Mbps and the power usage dropped by 10W. About half the ports on the switch are occupied. But then again, with the current prices it might make more sense just to replace the hardware with a newer more efficient model and it will pay itself back in a year instead of 5.
- pja 4y agoThis is an example of where getting rid of old kit & replacing it with new more power efficient hardware ends up being the greener option.
- xavxav 4y agonot necessarily, depends on the embodied emissions in the replacement gear. It is also surprisingly hard to get any information on those. I tried seeing if there were estimates of the kg co2 in a modern CPU chip but I found nada
- adql 4y ago> I tried seeing if there were estimates of the kg co2 in a modern CPU chip but I found nada Because they are in watts, not kg of CO2.
- aembleton 4y agoI think they were looking for the amount of CO2 realesed during the mining, manufacturing and distribution of the CPU chip.
- adql 4y agoI wonder if that could just be extrapolated from cost to make silicon wafer of required grade. Surely the amount of chemicals and power used would be similar per mm2 of silicon processed, regardless of whether it is big CPU or a bunch of smaller chips. Sure the machines will be more expensive but they are amortized over decades of production
- deleted 4y ago[deleted]
- leipert 4y agoDoes anyone have tips for a Synology NAS to hibernate reliably? My fear of powering the machine on and off completely on intervals, would be damaging the HDDs.
- Synaesthesia 4y agoMost PCs have their hard drives spin up and down rather frequently, and yet hard drives are still very reliable.
- trialect 4y agoDid you try reading info on this? Contacting Synology maybe? https://kb.synology.com/en-au/DSM/tutorial/What_stops_my_Synology_NAS_from_entering_System_Hibernation https://kb.synology.com/en-au/DSM/tutorial/What_stops_my_Syn...
- bombolo 4y agoI was using hdparm on my rpi home server to turn off the disk without unmounting it. It was just a cronjob to turn it off at night, and it would stay off until needed. The first request would then take over 5 seconds to turn it on again, and it would remain on.
- bullen 4y agoIf you want to push energy efficiency the Raspberry 2 (old ARM v7 version) is the best device at 1W idle / 2W full load, it saturates the SD card. One step up is Raspberry 4 for heavier workloads/networking at 3W idle / 6W full load, and after that 8-core Atom at 15W idle / 25W full load. As mentioned elsewhere in this thread, 100Mb/s, vs 1Gb/s vs 10Gb/s makes a lot of difference. IMO 1Gb/s is the only reasonable speed for home hosting as to saturate 10Gb/s you would need at least 20x (50Ah) lead-acid batteries of backup and that is almost industrial levels of investment/maintenance. The final constraint is that disks and RAM uses more energy than you would think, 256GB DDR5 uses 80W! And they wear faster than you would think too at these nm! Be careful with writes! So you need to plan your structure with the proper redundancy without going to far above the previously mentioned 1Gb/s saturation for your particular applications.
- ciupicri 4y ago> 256GB DDR5 uses 80W! WTF?!
- CyberDildonics 4y agoIf it sounds unbelievable, that's because it isn't remotely true. DDR5 is 13% more efficient than DDR4 and has 4 times the max die density. 256GB broken up into four 64GB sticks would use about 8 watts. This person make insane claims about power all the time. They claim nothing will surpass old raspberry pis and intel atoms in efficiency, that nothing will surpass 1 gb networking due to power constraints (even though it all has existed for well over a decade) and even claim that certain video games won't be playable in the future from power constraints. It is best not to think about it too hard.
- bullen 4y ago64GB DIMM are probably brittle. The 256GB I mentioned was industrial server memories built to last.
- CyberDildonics 4y ago
- guilamu 4y agoSomething's not right. I own both a passively cooled 2016 Mini PC OLOEY Intel Core i7-7500U (as a home media center) and a 2023 Minisforum UM690 (for work and it's amazing btw), and they both use about 7 watts when idling (screen off). How op is using 43 watts for an idling media center is just beyond me, he must be using a 1978 Intel 8086, right? Anyhow, 4 watts is still far better than 7 watts and this is a great achievement, but those 43 watts are really sketchy imho.
- bburrito 4y agoIt’s the hard drives that are staying on.
- forty 4y agoI have a HP Microserver N40L with 4 spinning disks. Last time I measured, I'm pretty sure it was consuming around 40W. I guess CPUs have gotten better in the last 10 years ;)
- joking 4y agoI have a synology nas and is unable to stop the spinning disks. A shame, every other thing in it is nice, but could have beter optimizations, as the disk are the most of its energy consumption.
- trialect 4y agoI also have a Synology nas, a DS413 for 10 years now. and I use it like this also for 10 years now. It works great. Only consumes ~4W in deep sleep/system hibernation (the wording depends on from which year you find text mentioning the above nas. Synology decided to reword the function back in some year), and automatically wakes up whenever it is needed. (also not this is not only HDD sleep, it is full system sleep)
- timrichard 4y agoYou can set the power options so that it can shut down after a period of inactivity. Mine has 8 HDDs. According to my power meter plug, it uses 70W when all are spinning, 30W when the drives are spun down, and about 3W when "off" (configured to WOL). When I need to use the NAS for a while, I usually bring it up via an SSH app on my phone, which connects to my always-on Raspberry Pi that can send the magic packet. I use the wol package in Arch.
- forty 4y agoThey could use something like [1] as a network bridge which would send the WoL packet when the machine is sleeping and something is trying to reach it :) [1] https://www.friendlyelec.com/index.php?route=product/product&product_id=282 https://www.friendlyelec.com/index.php?route=product/product...
- thesorrow 4y agoI use an old Intel Macbook to selfhost this kind of services. The idle draw is around 2W and you get a free UPS if your battery is still working. The sleep management on macOS is really well done and you don't even need a magic packet to wake the computer. You can configure `pmset` to wake on modem access (ring).
- b3lvedere 4y agoThanks for the idea. Currently i have a Raspberry Pi3 with an external USB-SATA 1TB disk connected which is on 24/7 doing stuff like PiHole, Navidrome, etc. I wonder if putting that all on a fairly new laptop with all the energy savings enabled would actually be more energy efficient.
- t0mas88 4y agoEven on a fairly old one (my "home server laptop" is 8 years old) it's really close in terms of power usage. And the laptop is much faster than the Raspberry and usually comes with fast SSD storage built in.
- b3lvedere 4y agoI'm still in doubt. I don't really need a huge performance boost, though the 1Gbps Ethernet connection of a laptop would be nice. According to specs my Pi 3 takes 5.1V and 2.5A which is 12.75Watt. An HP (Probook 650 G3) laptop takes 19.5V and 2.31A which is 45.045Watt. I know it does not eat up all that maximum power, but i still wonder if even the best power saving options would make it less than 12,75Watt.
- imhoguy 4y agoDid the same with 16GB i7 Dell E7420 laptop (2013), it draws 4W when idle, can spin up two cores instantly and fairly quickly transcode video with iGPU or host multiple Minecraft worlds. No way phone or RPi can get these params.
- t0mas88 4y ago
- KyleSanderson 4y agoNothing kills disks faster than spinning them down.
- irusensei 4y agoMy full server closet (which is also used to heat my jackets and coats) consumes about 50W of power. The actual two servers being responsible for less than 10 of it. Those are RockPro64 with 2 SATA SSD on each. No fans. Most of the heat comes from the network stuff, that is the cable modem, UDM router and switch. Replacing the UDM+switch with an 8 port UDM SE might be an interesting idea but I’m not sure since the trashcan UDM also does wireless. Going by the heat the UPC cable modem seems to be responsible for most of the power draw.
- gomezjdaniel 4y ago> assuming the 49 euro cent/kWh from the top Where do you live? That looks very expensive to me
- londons_explore 4y agoI'd kinda like all machines to do this all the time... The OS should go to sleep, and give the network hardware enough info to respond to simple requests (ie. maybe ARP requests, mDNS, and keeping a DHCP lease alive). Anything that comes in addressed to the machine that can't be handled by the network hardware should wake the machine, leaving the packet in a buffer for the machine to handle and then go back to sleep.
- londons_explore 4y agoAndroid can do this - the linux kernel goes into suspend-to-ram while the network is still up. If someone sends you a tweet, the cloud messaging service wakes the OS with a TCP packet, which eventually causes the "ding" notification that Musk has said something again...
- londons_explore 4y agoThe OS the one-laptop-per-child machine used was capable of this - it could sleep, with the screen either on or off, between keystrokes and network packets. Lots of the network stack was moved into the always-on network hardware, so it could for example participate in the mesh network while powered off. Sadly the whole project folded (for mostly non-tech reasons), taking most of it's cool tech with it.
- imhoguy 4y agoI think this is what Modern Standby aka "S0" power state is doing. Worse it is not always properly implemented and laptops turn on burning hot in backpacks (looking at you Lenovo Legion).
- Gasp0de 4y agoMy old laptop is more than powerful enough for Plex and backups, and idles at around 3W. Why someone would use a desktop PC as a home server in Europe is beyond me.
- dingaling 4y agoOften because they need more than one disk installed. You could use a NAS, but then you've cost and additional energy consumption.
- t0mas88 4y agoI use a USB 3 harddisk for that. Even my 8 year old "home server laptop" has usb 3.2 support which is faster than the disks can do anyway.
- kjkjadksj 4y agoSome laptops take more than 1 disk especially if they are old enough to have a dvd drive you can remove
- Gasp0de 4y agoMy Laptop has a Sata connection inside. Also, USB3 is fast enough. And even an additional nas only consumes 10-20W.
- eptcyka 4y agoI'd love to run a laptop, but I've yet to see good, cheap used laptops with ECC memory support.
- Gasp0de 4y agoWhy do you need ECC memory for a home server? What's the use case?
- weberer 4y agoJust trash the 43w while idle monstrosity and put Plex on your Raspberry Pi 4. Use an external drive and it will power on and off automatically. I see absolutely no need for the second, much more inefficient server.
- gsich 4y agoHow to make this usable with CIFS/SMB? I don't know if a mounted drive on either Linux or Windows will keep to "keepalive" the connection.
- pulketo 4y agoYou should also electrically fix your VAr, i'm not fresh with my electronics knowledge but VAr (Volt-Ampers Reactive) has no effect electrically on equipment (those are waste) because you are billed by the resultant vector of the sum of Watts (work) + VAr (Waste) = Tariff Bill I guess the cheapest way to improve power factor is a cappacitive bank more info: https://fortop.co.uk/knowledge/white-papers/reactive-power-reducing-compensating/ https://fortop.co.uk/knowledge/white-papers/reactive-power-r... About your monitoring command: lsof -w /mnt/* | grep /mnt/ | wc -l Have you taken a look into incrontab, maybe it's more cpu efficient, but i don't know, so you could take a look into it.
- GabeIsko 4y agoJust wanted to chime in and say that I get excellent results with a laptop homeserver. I haven't tried to hard looking into it's exact power consumption, but for the load I use it for it seems to be negligible. I'm not streaming media too frequently on it though. It sits at ~95% idle on average according to powertop. Anecdotally, the costs from this website (https://ecocostsavings.com/how-many-watts-does-a-laptop-use/ https://ecocostsavings.com/how-many-watts-does-a-laptop-use/) seem to check out based on what I observed. Idk the model # off the top of my head, but it is a lower end hp laptop my friend sold me running debian.
- jacooper 4y agoI was just talking about this today. You can do it in better way by making your proxy wake the server directly, its possible with Caddy or Openresty. https://news.ycombinator.com/item?id=34821935 https://news.ycombinator.com/item?id=34821935 All you have to care about is just auto sleeping and waking for the backups.
- Saris 4y agoI think just sleeping the HDDs might get about the same result. I have a couple systems with i3-7100U CPUs, with 2 sticks of RAM and an NVMe SSD they idle at about 1-2 watts booted up into Proxmox. HDDs suck down a lot of power relative to that, about 5W each just sitting there spun up. Unfortunately I haven't figured out a good option for sleeping drives that are part of a ZFS pool in proxmox, there's just too much going on with constant drive activity.