如果返回
APM_level的全稱為Advanced Power Management level,即(硬盤)高級電源管理級別.
man hdparm 可見:
Get/set Advanced Power Management feature, if the drive supports it.
A low value means aggressive power management and a high value means better performance.
Possible settings range from values 1 through 127 (which permit spin-down), and values 128 through 254 (which do not permit spin-down).
The highest degree of power management is attained with a setting of 1, and the highest I/O performance with a setting of 254.
A value of 255 tells hdparm to disable Advanced Power Management altogether on the drive (not all drives support disabling it, but most do).
該值的取值范圍為1~255,值越大,硬盤性能越高,其中255表示關(guān)閉硬盤/dev/sda的電源管理,254表示在開啟電源管理下的最高性能,1表示最低的硬盤性能但最省電.
這個值在1~127區(qū)間時允許spin-down,在128~254這個區(qū)間則禁止spin-down.
spin-down是指在閑置時掛起硬盤,停止轉(zhuǎn)動,但是頻繁的spin-down和spin-up會使硬盤壽命變短.
所以,即使你追求節(jié)能,減少發(fā)熱量,也建議你將該值設(shè)為128,執(zhí)行以下命令即可:
我的操作系統(tǒng)為Ubuntu 14.04(Kernel 3.14),我把該值設(shè)為128,在氣溫26度的情況下,硬盤溫度僅為36度(對比:此時CPU溫度為39度).
如果設(shè)為254,硬盤溫度甚至?xí)噬?5度,雖然這仍是一個正常的硬盤溫度,但對于筆記本用戶來說,靠近硬盤處的發(fā)熱量是很容易察覺到的.
另外電機持續(xù)高速的旋轉(zhuǎn)也會加快減少硬盤的壽命.
在性能和節(jié)能間做個折中,個人把APM_level設(shè)為192,讓其開機自動設(shè)置,在/etc/rc.local中加入:
如果/etc/rc.local不生效,可以在/etc/hdparm.conf中加入:
apm = 192
apm_battery = 192
}
apm表示在交流電供電模式下, apm_battery表示在電池供電模式下.
注意: 設(shè)置APM后執(zhí)行以下命令查看Load_Cycle_Count值
如果Load_Cycle_Count值每分鐘都在增加,這時你應(yīng)該把APM值設(shè)回原來的254,方法同上可以在/etc/hdparm.conf里修改.
執(zhí)行命令
因為磁頭頻繁的Load/Unload同樣會影響硬盤壽命,一般硬盤設(shè)計能承受的加載循環(huán)計數(shù)Load_Cycle_Count最多為600000次.