Power Saving

From TheBeard Science Project Wiki
Jump to: navigation, search

Spinning Down Hard Drives

Spinning down the hard drives when you're not using them saves power and makes the drives last longer. You can't really spin down the root drive, the one with the operating system installed, but your storage drives can be spun down. Obviously, it takes a few seconds for them to spin up the next time you access them, but for me it's well worth it.

Set Spindown Time on Startup

Simply make sure the following line runs on startup (assuming your storage drives are /dev/sda, /dev/sdb, /dev/sdd, and /dev/sde):

hdparm -S120 /dev/sd{a,b,d,e} &>/dev/null

The 120 sets the spindown time to 10 minutes (it 120*5 seconds). Set it to 60 to do 5 minutes. You could also do 0 if you don't want them to spin down at all.

Spindown on Command

For easy use, I added the following aliases to my ~/.bashrc file:

alias standby='sudo hdparm -y /dev/sd{a,b,d,e}'                                 
alias state='sudo hdparm -C /dev/sd{a,b,d,e}'

So now I can type standby to spin down the drives, and state to tell me what state they are in.

Laptop Mode Tools

Laptop Mode Tools provides a suite of programs for managing power on the system. I usually start off with the following (for a low-traffic server). https://wiki.archlinux.org/index.php/Laptop_Mode_Tools

sudo apt-get install laptop-mode-tools
sudo vim /etc/laptop-mode/conf.d/cpufreq.conf
	CONTROL_CPU_FREQUENCY=0
sudo service laptop-mode restart

Disable Bluetooth

If you don't plan to use it, disable bluetooth.

sudo systemctl disable bluetooth.service
sudo service bluetooth stop

#For System V
sudo update-rc.d bluetooth disable