# SATA Link Power Management

## Alan Turing

powertop (tool that helps you find what software is using the most power) has the following suggestion:

 *Quote:*   

> Enable SATA ALPM link power management via:
> 
>   echo min_power > /sys/class/scsi_host/host0/link_power_management_policy

 

If I do so my home server consumes around 0.5W less power. For me this is really a big deal, since my home server consumes only around 15W in idle.

Now I want to enable SATA Link Power Management by default.

 I could type the command echo min_power > /sys/class/scsi_host/host0/link_power_management_policy after each boot.

Obviously not a convenient way.   :Wink: 

 Put a script executing this command to /etc/local.d/.

Is this a good choice?

E.g., if you want that your hard drive goes to standby after 15(?) minutes, you don't put a script to /etc/local.d/, the "gentoo way" is to put the line sata_all_args="-S 120" to /etc/conf.d/hdparm and add /etc/init.d/hdparm to the default runlevel.

Is there already some init script that I should use to enable this SATA Link Power Management?

----------

## gorkypl

 *Alan Turing wrote:*   

> 
> 
> [*] Put a script executing this command to /etc/local.d/.
> 
> Is this a good choice?

 

Yes, the best one.

Just read /etc/local.d/README before (you have to end file with .start and so on).

----------

