Live data from Hacker News

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

dgross.ca

141–150 of 244 posts

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

#141

Earlier quoted context omitted.

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.

I had the same - ZFS across four drives with separate dataset and samba shares for each machine in my house. It would work and yes, I could rollback to a working snapshot. But it wasn't a set and forget system.

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

#142
post #49
post #27

I had similar idea, but in the end I've gone a different path: I've got a USFF PC with 2 external HDDs as NAS, and raspberry pi to keep always on stuff. I used to keep the PC up most of the day, and get it to sleep on schedule during night with `rtcwake`, and it was pretty reliable. I've removed the scheduled sleep from the PC, as I prefer backups to be done at night, and my "minilab" of USFF PC with SSD & 2 external…

How reliable is the external drive route? Do you run in RAID or similar?

I've got 2 external HDDs in ZFS mirror, cheap consumer disks. One of them is perfectly fine, second one started having occasional read or write errors, which is not great. With regular weekly scrub I hadn't had any data issues over last 3 years, and I'm pretty happy with the setup.

But it's a hit or miss with consumer external HDDs - before that, I used a single external HDD for backups at a time (100-200GB writes a week) and I lost data from 2 cheap external HDDs over span of 3 years.

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

#143
post #16

Diagrams are just visible enough that I can tell that they're present but I cannot otherwise see them. I suppose that's because I'm using a dark theme on Firefox. Not that it matters. There's enough text to figure out what's going on in the first place and it would not help me much in any case. I have a file server running of an ancient server motherboard from another age. (Supermicro X8SIL w/X3460 and 16GB ECC RAM)…

That sounds like a lot. I have a HP Z440 with a Xeon e5-2650v4 (24 cores) with 128GB RAM, 2x8TB spinning rust, 1x PCIe SSD, and another SATA SSD that’s idling at 70W. When it’s scrubbing the drives, it goes to around 100W. Running proxmox.

The machine without most of the drives and 32GB RAM cost me about 250$ used.

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

#144
post #126

Earlier quoted context omitted.

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.

There's basically nothing toconfigure with IPv6.

With IPv4 you need an addres, a gateway, netmasks, DNS.

On v6, as long as you have a working router sending RADV packets, clients will self-configure via SLAAC. Granted, same with IPv4 and DHCP.

If you don't have a router, most things should work thanks to link-local+mDNS.

You can easily pop a second router on the network to bridge two LANs, no need to reconfigure the DHCP. Gateways self-advertise, etc.

The point I'm trying to make is that most people trying toconfigure their IPv4 network have a functional IPv6 network the moment they put the cables in (on Linuxes es at least, not sure about other platforms).

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

#145

This feels like the sort of functionality that ought to just work now. Its a clearly useful thing for PCs all over the planet and it would be nice if they just went to sleep almost completely when idle and woke up on network or USB/PS2 input. The power savings would be enormous. Yet today I still have issues with power saving features, performance is lowered by having power saving on instead of flat out and various t…

It's not really worth it, even though I'd commend the OP for wading through the WoL stack. I have a NAS that's running 8 drives and a modern Intel CPU and it runs around 40w from the wall under load, and idles <10W with the drive spun down and CPU not doing anything. The WoL setup made more sense 5-10 years ago when power save functionality was much more primitive and drives were way less efficient.

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

#146
post #94

> To prevent unwanted wake-ups, you'll need to ensure no device on the network is sending extraneous packets to the server Assume the home network is using 10.0.x addresses. I wonder if it would be useful to put the server on 10.1.x, add a virtual ethernet interface to the RPi that is also on 10.1.x, and configure the RPi to route between 10.0.x and 10.1.x. Configure the RPi to drop any extraneous packets directed to…

I don't know why he didn't just use magicpackets to solve that problem. That's the whole reason they exist.

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

#147
post #117

Earlier quoted context omitted.

> you can almost go IPv6 only nowadays if you wanted to. I think that is the reason why many aren't enthusiastic about it.

Again, I disabled IPv4 purely for testing reasons , to guarantee nothing was using IPv4 without me knowing it. There’s no reason to actually disable IPv4 as a fallback. Over 99.999% of traffic through my home network is IPv6 now. The tiny remainder that has to use IPv4 does, without issue. 5 months on, and nary a complaint. Just works. The world is ready for IPv6 as your primary, with IPv4 as the fallback.

Not really. When I worked in a networking company, we've observed that connections between hosts via IPv6 were often worse than with IPv4. By connection, I mean between two hops on route to your destination.

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

#148
In the cloud you would just call the start_instance() API method to wake up the instance on demand.

Is there a way we will have mass-produced personal cloud devices that use hypervisors with a low-power consumption control plane and use standard APIs and Terraform

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

#149
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…

I agree, but you could argue that the Raspberry Pi is not performant enough during restores or browsing the backups. During the backup itself performance should not have to be that big of an issue as it's mostly a background operation you will not be waiting on. You could also use the RPi as a stepping stone which syncs it's files to the 'real' backup server which is on a daily/weekly timer instead of on-demand setup…

> power hungry server running 24/7

Nothing in this article supports this statement. It just says "high power consumption" without measuring, and declares victory without measuring the power saved. The fact is that power scaling has almost erased the difference between "suspended" and just "idle", to such an extent that there might not even be a meaningful difference, or any measurable difference.

My NUC 12 Pro is drawing, at the wall, 2.7W, as best as I can measure. The SoC reports drawing below 200mW. This server is on. The way to get low power states on these is to just make sure your Linux is up to the task and your BIOS works correctly, which is one of the reasons to choose a NUC. The first-party firmware works!

Another important thing for low-power server operation is to either use wifi, or make sure your ethernet is configured correctly for low-power operation. Unless you fix it, gigabit ethernet by default will propagate the link state all the way down to a high power state on the CPU. The NIC will say that it has tight latency requirements because the link is active, and it will configure the PCIe bus to avoid PCI link power management, and it will tell the CPU that it can't go below PC6. To avoid this you have to configure your NIC to ignore link latency requirements. Just unplugging the ethernet is the easier path, and it's faster than gigabit these days.

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

#150
post #128

Earlier quoted context omitted.

I agree, but you could argue that the Raspberry Pi is not performant enough during restores or browsing the backups. During the backup itself performance should not have to be that big of an issue as it's mostly a background operation you will not be waiting on. You could also use the RPi as a stepping stone which syncs it's files to the 'real' backup server which is on a daily/weekly timer instead of on-demand setup…

Then how about an N95/N100 (recent Celeron successor) mini PC, like the ones from Beelink? They don’t draw that much power, but are 2-3x faster than a Raspi, have HW supported video de/encoding and can even run Windows if you needed that.

"that much power" is pretty subjective, is it 2x or 10x a pi? Might be a turnoff for some.
Post reply on HN