Small hacks for a better energy efficient system
This articles illustrate a series of small hack to improve the efficiency (energy-wise) of your system. Each hack comes with a small explanatory paragraph.
Flushing data to disk periodically. Linux flushes data to disk periodically in a sort of batch. Thus it can improve disk write access by regrouping them. One possibility is to increase this period so that the hard disk is less solicited. However, this could increase data loss in case of a system or power failure, so you probably don't want to activate this setting when on battery only. The default period setting is 5 sec (500 centisec), you can increase it to 15 sec with out too much damage for your data. Here is the command line to do so (Note: this modification is for a session, once you reboot it will be reset to default)
sudo bash -c "echo 1500 > /proc/sys/vm/dirty_writeback_centisecs"
sudo hal-disable-polling --device /dev/scd0
Adjusting SATA interface power management. Not much explanation yet, but this command can reduce power consumption. Possible values for this parameters are: min_power (can reach lowest power states, thus could impact performance when “waking up”); max_performance (never tries to reach lower power states); medium_power (can reach lower power states, but not the lowest. Performance impact is decreased).
sudo bash -c "echo min_power > /sys/class/scsi_host/host0/link_power_management_policy"
Better management of multi-core and multi-threaded system (energy-wise). These two settings are useful when on battery mode as they can have an impact on the CPU performance. Basically, they tend to tell the Linux scheduler to use mainly one core and when this one is busy to use the other cores, instead of just dispatching the load. Thus, the idle core can go to deeper low power states. For multi-threaded system, the scheduler will try to use all threads from a single core before dispatching load to other threads from other cores. Note, that you may be able to tweak these settings only if you have a multi-core or multi-threaded system (or both). Here is the command line to do so (Note: this modification is for a session, once you reboot it will be reset to default)
For multi-core systems:
sudo sh -c "echo 1 > /sys/devices/system/cpu/sched_mc_power_savings"
For multi-threaded systems:
sudo sh -c "echo 1 > /sys/devices/system/cpu/sched_smt_power_savings"