Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Laptop hard disc spindown, Load_Cycle_Count and linux
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
hans_da
n00b
n00b


Joined: 09 Mar 2007
Posts: 64

PostPosted: Fri Jul 25, 2008 6:43 pm    Post subject: Laptop hard disc spindown, Load_Cycle_Count and linux Reply with quote

I discovered this problem when I start to notice the strange noise of my harddisk on a two month old laptop. A little bit of google help me to find out the problem. It seems that my laptop harddisc, SAMSUNG HM160HI, takes very radical power saving strategy. Be default it tries to spin down whenever it is possible, docking the r/w head like crazy, making strange noise. The Load_Cycle_Count (total count of spin down) is already 45397 after two months usage. Considering the manifacturer specifies 600000 Load_Cycle_Count life time, it means possibly a early die of the harddisc. And it seems that a LOT of laptop harddiscs nowadays suffer this problem. A detailed thread is reported here:

https://launchpad.net/ubuntu/+source/acpi-support/+bug/59695

It seems it is not a problem of ubuntu or gentoo, not even a problem of Linux but a problem of the harddisk hardware itsself. By default the laptop harddisc spins down too often, and docks the r/w head too often.

The only solution now seems to tune the laptop-mode, basically hdparm the harddisc parameters. Here is some experience on my laptop harddisc.

-Sn The idle time. If the disc is idle for certain time, the hard disc will spin-down. But in the case of laptop harddisc, this does not mean the disc will not automatically spin down before the certain time is reached! Also the -S0 usually does not mean the disc will never spin down!

-B n the Advanced Power Management level. 255 means no Advanced Power Management is applied. But for laptop harddisc if one uses -B 255 usually the harddisc revert to the default, very radical power saving way. In this case, my harddisc would spin-down about 300 times during a 8-hours daily work. To stop uncontrolled spin-down usually one needs to use -B 254.
Not all the numbers 1-255 are really accepted by the harddisk. In the case of SAMSUNG HM160HI, it accept only 1, 128, 254, 255. And behavior of 255 is almost the same as 128. In case of -B 1 and 128 the disc will spin down even when the idle time (Sn) is not reached, totally unpredictable. Sometimes even 10 times in 30 sec. although the idle time is 1 minute. By setting to -B 254 the spin-down behavior is determined solely by the -Sn.
Also if I use -B 1 or 128, and -S0, I got the same fast increasing in the Load_Cycle_Count.

But this is not the end of the story. Laptop harddisc can also dock the r/w head to prevent bump. This usually produce a strange click noise from the harddisc. In my case the disc will produce a LOT of docking if I set -B 254. About 5 per hour during working. It seems the only thing I can do is to use -M n parameters of hdparm. -M 254 helps to bring down the docking times.

My experience is that one should tune carefully the -S -M -B parameters of hdparm to bring down the increasing rate of uncontrolled spin down and docking. My combination is now -S12 -B 254 -M 254.
Back to top
View user's profile Send private message
desultory
Administrator
Administrator


Joined: 04 Nov 2005
Posts: 7818

PostPosted: Sat Jul 26, 2008 7:39 am    Post subject: Reply with quote

Moved from Kernel & Hardware to Documentation, Tips & Tricks.
Back to top
View user's profile Send private message
luismanson
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2005
Posts: 123

PostPosted: Fri Sep 26, 2008 1:50 pm    Post subject: Reply with quote

I posted this in the proper ubuntu thread....
PDF chapter: http://www.scribd.com/doc/6209343/Fujitsu-APM


Quote:
I got this from Fujitsu support:
http://www.scribd.com/doc/6209343/Fujitsu-APM
They also toldme:
any ideas?

i did not make any tests yet, but converting hex to dec i got:

FR = 05h : Enable APM = 5?

SC = C0h - FEh : Mode-0 Active Idle Low Power Idle =SC = 192- 254
SC = 80h - BFh : Mode-1 Active Idle Low Power Idle (Default) = SC = 128 - 191
SC = 01h - 7Fh : Mode-2 Active Idle Low Power Idle Standby = SC = 1 - 127

FR = 85h : Disable APM (Set Mode-0) = 133




any ideas???


thanks!
_________________
La wiki para usuarios novatos en GNU/Linux!
Back to top
View user's profile Send private message
Seron
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 291
Location: Malmö, Sweden

PostPosted: Thu May 27, 2010 3:12 pm    Post subject: Reply with quote

@hans_da: This was very interesting. I've got a Samsung HM120JC which behaves very much like you describe. It's been running in a laptop server since a few (2?) years. Unfortunately for me I only now looked into this. It was spinning down aggressively, a few seconds after a disc access. Its Load_Cycle_Count is 1719197! Almost 3x the manufacturers limit. Now I've set (using laptop_mode) parameters -S 7200 -B 254, hoping to prolong its life. Thanks for posting this. It explained why the disk behaved this crazy and why setting for laptop_mode were not respected.
_________________
man cannot be brave without being afraid
Back to top
View user's profile Send private message
Seron
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 291
Location: Malmö, Sweden

PostPosted: Wed Jun 16, 2010 1:05 pm    Post subject: Reply with quote

I've now migrated to a Western Digital Scorpio Blue WD3200BEVE 8MB 320GB. This disk seems not to respect the spindown timeout (-S) setting. Whatever -S is set to the disk will either spin down within 10 seconds (if -B <128) or not spin down (if -B >=128). I've set it to -B 128 -S12 for now.
_________________
man cannot be brave without being afraid
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum