Power saving and conclusion

Saving Power

The only way to effectively measure a desktop's power is via a meter plugged into the wall. I have an 'Eco Savers' one and this reads ~24W
(watts) when the server is idle. It's actually not a bad starting point considering, but there are a few tricks to get it a little lower.

Others made little difference, but didn't impact the system, except the Autosuspend for my mouse, which stopped it working.

The end result was about 2W of power saved, now using 24W (or averaging slightly less). This is small, but is 8% less for a machine that
will be on 24/7. Once I unplugged the keyboard, mouse and monitor too, it will also reduce further.

The other thing I can do, since all my disks are 2.5" laptop disks, is spin them down when idle.

By executing hdparm -y for all my disks, I save an additional ~4W power. I'm now at 19.8W. Including the powertop settings too, that's a
23% saving.

sudo hdparm -y /dev/sdb
sudo hdparm -y /dev/sdc

I ignore /dev/sda - that's an SSD, and also where the O/S is installed so it shouldn't really spin down.

To make things more permanent, and less immediate, we can make a script to set the Runtime Power Management, SATA link power management
and set the HDD idle times after boot.

Then add the script into a cron job on reboot by inserting a new line (change the directory to your home location).

sudo crontab -e

@reboot /home/dan/powersave.sh

Now reboot and check the power usage on your wall plug monitor (if you have one). It should be lower than before.

I found in the past that using hdparm did not spin my disks down after the expected time. This looks like a common problem with
Western Digital disks. I spent a while looking for a solution using hdparm, but actually found that setting the spindown time using
Ubuntu's disks utility (gnome-disks) under Drive Settings does work, and keeps it after reboots. So I just used that instead.

My latest Seagate drives seem to be spinning down fine with hdparm settings 127 for power management, and 180 (15 minutes) for spindown
time, but didn't seem to work with 241 (30 minutes).

Beware though - spinning up/down reduces the life of a hard disk so if you expect to be regularly accessing your files, give the drives a
reasonable timeout before spinning down. Also, be more cautious with 3.5" desktop hard drives. These have larger platters and spin
faster so have more stress on them during spin-up (I suggest specific NAS disks such as WD Red or Seagate Ironwolf which are designed to
operate 24x7 and slow down when not in use).

Laptop disks (2.5") are designed to spin up more often so unless you need the best performance and/or high capacity, I'd choose those
instead.

With the monitor unplugged and USB keyboard/mouse unplugged (there are now just three cables connected to my PC - Power cord, LAN Network
cable and WAN Network cable), the idle power use comes down to 17.8W.

Your power savings may vary. If your building new, hopefully you can do really well with an Skylake or Kaby Lake CPU (or maybe AMD Ryzen?) and a
more modern motherboard. Low power Celerons will do even better. Something that supports DDR3L (low voltage) or DDR4 may also help a bit.

Equally, if you're re-purposing an old desktop, this will not do as well as the 20W idle that I'm getting - but although it will cost more
electric, for some years it will save money compared to purchasing new hardware, and you could argue more environmentally friendly than trying to
dispose of old hardware!

Also, have a think about CPU and case fans. The CPU fan unless it is old hardware should definitely be a PWM type (4 pin). Case fans ideally
PWM too if your motherboard supports it (these fans will then speed up/down depending on temperatures), or do as I did and add a fan control
with an LM2956 module.

Conclusion

My system has been running reliably for many months now. It's taken a long time to build it and write this as I go, but it has been a worthwhile
learning experience and hopefully other's reading can build and even improve on it.

Remember that it is flexible. If you want to add services, like HTTP server, SFTP, game servers, torrent software, you can. If you have the
hardware, it could also be used to build additional VMs for say software development.

One useful addition I did add was Plex, which allows me to cast music, pictures and videos to my TV and Chromecast/Chromecast Audio. Nextcloud might
be another suggestion, giving Dropbox like synchronisation of files such as my Documents.

For my needs, it has met them well. The router happily handles Internet browsing, Gaming on the PS4, watching 4K TV streams. It never crashes and
rarely needs reboots (patches being the only reason). The VPN also lets me access my files whilst away, amongst other benefits.

^ Picture of server open side. The SSD sits in a 2.5 to ODD (laptop style DVD/optical disk drive) adaptor, since I won't need a CD/DVD drive in the server and already had
the adaptor from an old laptop.

Feel free to print material you may need, but if you want to use information on your own sites and for business purposes, please E-mail me or link to my site using this address: www.electro-dan.co.uk

Information I supply on this site and by e-mail cannot be guaranteed to be correct - it will be to the best of my knowledge. If you do spot a mistake anywhere on this site - please let me know and it will be fixed.