‘Tuned’ is a utility developed by RedHat that monitors your hardware and applies various standard power saving techniques for reducing the overall power consumption (to CPU, HDD, GPU, Network devices etc). It is still in development, but you can install and use it in distributions like Fedora with ease.
It is a command-line based utility, but it’s pretty much automatic. All you have to do is install it, then select a power saving ‘profile’ that meets your needs, and you’re good to go. Currently there are 6 power saving profiles exist (‘balanced’, ‘latency-performance’, ‘powersave’, ‘throughoutput-performance’, ‘virtual-guest’ and ‘virtual-host’).
There are few other profiles that are proposed, but they still don’t seem to be included in the ‘Tuned’ that comes for Fedora 18 though. Another feature of ‘Tuned’ is that, if you have a SATA disk, then you can easily enable/disable and switch between options of ‘ALPM’ (a power saving feature of SATA disks), if that disk is supported by Fedora.
As you can see from the above and the below images, I used ‘powerstat’ tool to measure the power before and after installing ‘Tuned’ in Fedora 18, and it was able to reduce the overall power consumption of my Laptop by 1W (roughly). However, I think it was because ‘ALPM’ was disabled before and ‘Tuned’ simply enabled it, so if you already have enabled ‘ALPM’, then you might not see a big difference as I did.
That said, ‘Tuned’ still can help you reduce the power consumption by various other tweaks … so it is better to try it out first and see for yourself :). Installing it in Fedora 18 is pretty easy. Please follow the below steps for that.
Open your Terminal and enter the below command to install it.
su -c 'yum install tuned'
Then we have to make ‘Tuned’ run as a system service when booting so it’ll continue to monitor and apply those settings, every time you boot your computer. For that, simply use the below commands (one after the other, of course).
su -c 'systemctl start tuned.service'
su -c 'systemctl enable tuned.service'
Now we have to choose one of the available power saving profiles. But first, let’s get a list of available profiles, plus the currently active one.
Again, open your Terminal and enter the below command.
This will give you an output similar to the one shown in the below screenshot. As you can see, the currently active one is listed at the end.
If you want to get a detailed information about the profiles, then please read its manual by entering the below command.
Once you’ve chosen a profile, enter the below command to activate it (until you switch to a different one, the newly selected one will be used).
tuned-adm profile your-profile-name
Make sure to replace ‘your-profile-name‘ accordingly. That’s it, now you’re done!.
If you want, you can change the ‘ALPM’ setting (plus other settings as well) in ‘Tuned’ with ease too. This configuration file is different for each profile and is saved individually inside the folders of each profile.
So let’s assume that I have chosen the ‘powersave’ profile. Then to access the configuration file of that profile I’ll use the below command.
su -c 'vi /usr/lib/tuned/powersave/tuned.conf'
Note: To access the configuration file of other profiles, simply replace ‘powersave‘ with their names.
This will open the file in ‘vi’ editor. Once opened, press the ‘i’ key, otherwise you won’t be able to edit the content. Then, scroll-down (use the down-arrow) a bit and find a text called ‘alpm=min_power’, under the ‘[disk] sub option (shown below).
‘ALPM’ has three options.
min_power : This makes it use the lowest possible power, thus the SATA disk will be performing at its lowest possible performance level (the default setting in the ‘powersave’ profile).
medium_power : This makes it use the next available, lowest possible power, after the ‘min_power’ option. Basically, it is a balance between the best performance and lowest power usage.
max_performance : If you choose this, then it will disable all the power saving techniques thus the disk will be performing at its best.
So, make your selection and then simply replace the default ‘min_power‘ text code with the new setting’s name.
Once done, press the ‘Esc’ key on your keyboard and then type ‘:wq’ to save and exit the editor. You will have to restart the ‘tuned’ system service for changes to take effect (if I’m not mistaken) or reboot your computer. Because restarting the service is the best way, enter the below command.
su -c 'systemctl restart tuned.service'
Well, that’s it.