欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Ubuntu系統(tǒng)運行時降低硬盤占用的相關(guān)嘗試

OSChina   發(fā)布時間:2015-10-13 11:40:57   作者:eechen   我要評論
這篇文章主要介紹了Ubuntu系統(tǒng)運行時降低硬盤占用的相關(guān)嘗試,其中提到APM_level的相關(guān)設(shè)置,需要的朋友可以參考下


復制代碼
代碼如下:
sudo hdparm -B /dev/sda
可見硬盤/dev/sda的APM_level值為254,表示硬盤性能最大化,這需要保持高水平的硬盤轉(zhuǎn)速,硬盤發(fā)熱量自然就大.
如果返回
復制代碼
代碼如下:
/dev/sda: APM_level = not supported
,則表示你的硬盤不支持APM(高級電源管理).

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í)行以下命令即可:

復制代碼
代碼如下:
sudo hdparm -B 128 /dev/sda

我的操作系統(tǒng)為Ubuntu 14.04(Kernel 3.14),我把該值設(shè)為128,在氣溫26度的情況下,硬盤溫度僅為36度(對比:此時CPU溫度為39度).

如果設(shè)為254,硬盤溫度甚至會攀升到45度,雖然這仍是一個正常的硬盤溫度,但對于筆記本用戶來說,靠近硬盤處的發(fā)熱量是很容易察覺到的.
另外電機持續(xù)高速的旋轉(zhuǎn)也會加快減少硬盤的壽命.
在性能和節(jié)能間做個折中,個人把APM_level設(shè)為192,讓其開機自動設(shè)置,在/etc/rc.local中加入:

復制代碼
代碼如下:
hdparm -B 192 /dev/sda

如果/etc/rc.local不生效,可以在/etc/hdparm.conf中加入:

復制代碼
代碼如下:
/dev/sda {
apm = 192
apm_battery = 192
}

apm表示在交流電供電模式下, apm_battery表示在電池供電模式下.

注意: 設(shè)置APM后執(zhí)行以下命令查看Load_Cycle_Count值

復制代碼
代碼如下:
sudo smartctl -a /dev/sda | grep Load_Cycle_Count

如果Load_Cycle_Count值每分鐘都在增加,這時你應(yīng)該把APM值設(shè)回原來的254,方法同上可以在/etc/hdparm.conf里修改.
執(zhí)行命令
復制代碼
代碼如下:
sudo hdparm -B 254 /dev/sda
即時生效, 配置在重啟后生效.
因為磁頭頻繁的Load/Unload同樣會影響硬盤壽命,一般硬盤設(shè)計能承受的加載循環(huán)計數(shù)Load_Cycle_Count最多為600000次.

相關(guān)文章

最新評論