I’m new to selfhosting and I find myself rarely using the server, only when I need to retrieve a document or something.
I was thinking of implementing something to make it power on, on demand, but I’m not sure if this might be harmful for the HDDs, and I’m not sure how to implment it if so.
What’s your recommendation to do so? I’m running a dell optiplex 3050
If you don’t need a lot of resources, I would just get something very low power and an SSD big enough for your purposes, and leave it on all the time. Wake on LAN has never worked reliably for me (or at all, really).
Starting up is definitely where spinning drives experience the most failures. They’ll run for tens of thousands of hours just fine, but one day if they stop, they might never spin back up.
You should also just measure your current power consumption for a baseline. You didn’t say whether you have a 3050 tower, mini, or micro, but it’s really the model of CPU that affects power the most.
Wake-on-LAN is probably what you want, if your specific hardware supports it which it probably does. This is a case of figuring out your exact hardware and a little RTFM-ing about how to enable and use WOL.
As for the drives it, in theory, would add more load/unload cycles to them and thus reduce their lifespan. But, in the real world, that almost certainly doesn’t matter, unless you’re turning the system on and off every 5 minutes: modern drives expect to go in and out of power saving modes and most controllers (especially usb enclosures!) do this pretty aggressively, so a couple more load cycles more-or-less are unlikely to actually cause your drive to fail any quicker than it would anyways.
Thank you
I think it has wake on Lan, so that means any connection attempt would wake it?
Not quite. Wake on LAN requires a special packet be sent, the OS to boot, then you can attempt to connect to whatever’s running.
It’s fairly manual (though you COULD maybe automate it, if you have other infrastructure that’s watching for things: ex. using home assistant to send the packet when you come home), and has a delay since the system has to boot before it’ll respond to anything.
I built a system ground up with a focus on power-usage a few years ago. You can go far down the rabbit hole when you start googling, but the key take-aways for me are:
- Eliminate features you don’t really need. E.g. do you realy need a RAID 10 configuration with 4 disks? Or can you get by with 2, or maybe even 1 (which might mean you experience downtime while waiting for a new HDD, but you do keep backups right?).
- Standard 300-400w ATX power supplies are inefficient under low loads (meaning much AC goes to waste converting it to DC). Use a PicoPSU (or a motherboard that runs on DC). Search for a high-quality power adapter (e.g. Leicke) that’s rated for low loads. Just make sure your PSU can handle booting, when your system will draw much more.
- Install drivers for motherboard features you don’t need (like soundcards or wifi) and then switch them off in the OS as this usually sets them in a more power-efficient state rather than disabling them in BIOS.
- SSD’s use less power than HDD’s but get expensive for higher capacities. I use a Nvme SSD as a startup drive and to host my containers, and 2,5" 5400rpm HDD’s for storage. Those disks are slow but get the job done, and despite running 24/7 there hasn’t been any failures.
- I installed a passive cooling-block on the CPU and optimized the airflow in the case. It has 3 (small, as it’s a 1u server case) case fans that are controlled by fancontrol and only kick in when the cpu’s temp is > 60°C, which is not very oten. This also means it’s very quiet ;-).
- Make sure to configure all power settings in the OS of your choice (powertop and tlp for linux).
Great tips. I hunted 2.5" HDDs when I was doing my build but they seem to be on their way out, being meant for laptops which are now largely just using SSDs :(
I used to buy external Seagate HDD’s and pry open the enclosure. Inside it’s just a regular 2,5" HDD with a small sata>usb board. Last time I checked these are still available and might be easier to find (and cheaper). But yeah, you don’t have many models to choose from these days. You could use SSD’s which will save a bit of power but they are vastly more expensive. I don’t think the money you’ll save on power will offset that.
If you only use it so rarely, why not just connect a USB drive to your network router? Most have an option to serve files from that over the network.
I have a similar question that I wonder if anyone can help with. So I’m not overly familiar with self hosting but I’d like to get into it more with simple things, I have a raspberry pi connected to a 3d printer for networked controls and I feel like I should be able to make the raspberry pi not be used just for that only. So like I’m thinking maybe I can run simple things along with it. Basically since the printer is noisy I don’t want all that to be on all the time but I’d like the raspberry pi to do oter things too. Maybe I should make a separate post for this haha, anyways thanks for listening. Oh forgot to add my question lol So basically I’m wondering if there’s a way that power on lan or something may be useful here
A RasberryPi uses so little power when idleing that turning it on and off on demand makes not a whole lot of a difference. It is different though with OP’s x86 with spinning rust drives.