I was wondering if any of you are aware of any mSATA SSD models (suitable for OpenWrt x86 hosts as a boot drive, so pretty much any capacity at around or more than 1GB would be fine) that properly support Aggressive/Active Link Power Management when connected to an appropriate HBA, like Intel's AHCI-compatible SATA controllers.
If you have such a drive in service, you can check the current link power mgmt policy by running
find /sys/ -xdev -name link_power_management_policy -exec grep -H . {} +
For my ports and drive which does not support ALPM, that yields a value of med_power_with_dipm, which is a relatively recent low-power mode said to offer a devent trade-off between power consumption, responsiveness, and compatibility.
Now, if you were to echo min_power into these link-specific sysfs files, ALPM should be enabled. An example command line to automate that would read like this:
find /sys/ -xdev -name link_power_management_policy -exec sh -c 'echo min_power > {}' \;
!WARNING! ALPM has been known to cause data loss with some setups and drives, and there's an extensive list of per-disk quirks in the kernel that prevents enabling it for known-bad ones - however, there's no guarantee that your specific disk is protected by such a quirk if it indeed has trouble with ALPM, which could cause trouble like unexpected reboots, the system locking up, or even data lost on the drive!
After setting the policy to min_power, check for new lines in the kernel's debug ringbuffer via dmesg
. For instance, my system logs the following:
[4247483.190309] ahci 0000:00:17.0: port does not support device sleep
... which indicates that my Samsung 840 EVO mSATA SSD does not properly handle ALPM.
I would very much like to know if there are mSATA SSDs that do, and how much power enabling ALPM does save.