Live data from Hacker News

Making a Linux home server sleep on idle and wake on demand – the simple way

dgross.ca

131–140 of 244 posts

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#131

Earlier quoted context omitted.

Meh, I struggled to get my pi to work as a time machine server. It would work for a few weeks and then just stop working and I would have to start the backup from scratch previous backups becoming unusable. In the end I just plugged an external hard disk into the mac. I have had similar issues in the past even with such simple things as SSH to a Mac. It would be easy to blame the pi or Linux, but as far as I can tell…

Time Machine over NAS has always been unstable for me. As you experienced, my backup would be regularly corrupted and would need to restart. Alternatively, a normal I eventually gave up on the NAS and now backup to external drives at home. This site has excellent articles on Time Machine - scroll down to Time Machine Problems: https://eclecticlight.co/mac-troubleshooting-summary/

There are some quirks to setting up SMB so Time Machine is happy, but I have had great success with ZFS+SMB hosting my TM backups. Have been running for a little over a month and nothing is corrupt. Self hosting is still somewhat hard, I don't blame you for bailing on something so critical to uptime in the first place.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#132
post #63

This reminds me of back when Apple sold WiFi access points (they were high-quality, but a pain to administer since they required running a Windows-only or a MacOS-only executable). I tried running arpwatch for a while on a network which had one of these, and gave up, since the MAC address for any Apple machine on the network was constantly bouncing between the real machine and the access point. Apparently, whenever a…

They were high-quality. I used one for years, even had a hard drive attached for a while for Time Machine backups, which worked well.

I had to stop using it for some reason--it wasn't getting updates, or newer WiFi cards weren't working well with it, something--and everything I've used since has been disappointing. Even at the price point of the AirPort, they all have various issues. I wish this technology was a done thing.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#133

Earlier quoted context omitted.

Meh, I struggled to get my pi to work as a time machine server. It would work for a few weeks and then just stop working and I would have to start the backup from scratch previous backups becoming unusable. In the end I just plugged an external hard disk into the mac. I have had similar issues in the past even with such simple things as SSH to a Mac. It would be easy to blame the pi or Linux, but as far as I can tell…

Time Machine over NAS has always been unstable for me. As you experienced, my backup would be regularly corrupted and would need to restart. Alternatively, a normal I eventually gave up on the NAS and now backup to external drives at home. This site has excellent articles on Time Machine - scroll down to Time Machine Problems: https://eclecticlight.co/mac-troubleshooting-summary/

My time machine share is backed by ZFS. I have a separate dataset for each laptop, with snapshots retained for 30 days. As long as I know roughly the last time the backup worked, I can restore that snapshot so I don't need to start fresh.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#134
post #18

I wonder how many sleep/wake cycles would it take a day to outweigh the TCO decrease of the power bill with the TCO increase of the increased stress/amortization of the hardware, especially HDDs.

Probably a lot. My anecdata: I have had four Seagate HDDs in my desktop PC since 2007 and despite a couple of remapped sectors, they're still working fine. I often power it on and off 1-2 times a day, and the drives are set to spin down when not in use. The SMART data for these drives shows approximately 37,000 power on hours and 17,000 start/stop cycles. That's about 4 years 3 months of actual power on time, and abo…

That might possibly be close where you live, but not where I live. I need to heat my home at least 8 months a year and I heat using electricity (which isn't the smartest thing to do, but that's the way the house was built 30 years ago). It is too hot inside less than 4 weeks a year. So saving energy is done by trying to live in cooler rooms, but not by searching for small consumers.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#135
post #126

Earlier quoted context omitted.

Without realising and without having had to set it up themselves.

So? The vast majority of IPv4 users also do not realize and did not have to set it up themselves.

No, but the vast majority of people who understand enough IPv4 to set up a home or small office network still don't understand IPv6.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#137
post #20
post #3

Another option, if your needs are relatively modest, is to choose a low power mini PC. The one I chose idles at around 5W under Linux before any tweaking. It is based on the Intel N5105. I have a few 2.5” external HDDs attached for backup which are configured to sleep after a short time.

I'm curious if you have measured power at the well (e.g. smart plug with energy metering or Kill-a-watt.) I just set up a test server with a J1900 (10W TDP.) With 8GB RAM and running from an SSD it uses 25W. Add 4 7200RPM HDDs and it's up to 65W idling. I have another test server based on a Raspberry Pi 4B. The Pi boots from SD card and uses about 5W. Add 2 drives in a USB drive bay and power for the setup is now up…

Running powertop --auto-tune and TLP makes a lot of difference on my server (60->30W). You can further tune CPU, disks and GPU to preserve energy. I suggest starting with a laptop or a phone (~postmarketos)instea d,as those are already tuned for low-energy modes, and you won't have, say, a BIOS preventing PCI devices from sleeping (looks at server).

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#138

Earlier quoted context omitted.

I think you'll be disappointed by the kernel support, especially if you want to run docker containers or anything like that.

Indeed, running docker on android requires a custom kernel: https://gist.github.com/FreddieOliveira/efe850df7ff3951cb62d... The pixel 6 and 7 have full KVM capabilities tho: https://www.patreon.com/posts/74333551

You could also use postmarketos, mobian, etc. Have a look at the pmOS wiki for device support, most support USB OTG, and usually you don't need GPU acceleration nor screen/audio/cameras, which are usual pain points.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#139

Earlier quoted context omitted.

> Obviously Linux can sleep easily since decades ago. Yeah right. Suspend and resume is still buggy as hell. Power management in general in Linux is still awful after all these years.

Low-level power savings (s3 sleep) and magic packet (Wake-on-LAN) have been a standard since the late 90s. Getting a Linux OS that actually delivers these standardized power features is now a 20+ year old bug. I can only imagine the amount of energy that would have been saved if this bug was properly fixed 25 years ago. With solid-state tech becoming cheaper every day, I now expect nobody will make an "it just works"…

Who pays for Linux development? Either companies for servers or embedded Linux. Servers don't sleep. Embedded might sleep, but it's not PC hardware, so it needs completely different power management features.

Nobody is paying for Linux on average PC hardware, that's why 20 year old bugs are not fixed.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#140
post #121
post #33

This looks like one of those home server infrastructure setup rabbit holes I would've bailed out of within the first 10 minutes of Googling to research the problem. I commend the author for their perseverance and the writeup - rabbit hole writeups are their own form of entertainment. That alone was worth it. I could never run anything that looks like such a conceptual pain the butt. A pain to maintain and troubleshoo…

You could have an Arduino to wake the Pi.

You can't sleep a Pi.
Post reply on HN