SCIENTIFIC-LINUX-USERS Archives

March 2008

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ioannis Vranos <[log in to unmask]>
Reply To:
Ioannis Vranos <[log in to unmask]>
Date:
Sat, 15 Mar 2008 18:10:49 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (92 lines)
Ioannis Vranos wrote:
> Andrea wrote:
>> Hi all,
>>
>> I'm writing to report that I have detected the "unload cycle bug" 
>> while running SL5.1 on my laptop. This "bug" has received some 
>> attention months ago when it was found in Ubuntu¹ and consequently 
>> featured on Slashdot².
>>
>>
>> ----- SUMMARY -----
>>
>> Some hard disk manufacturers ship their drives - especially laptop 
>> drives - preset with some aggressive power saving settings. These 
>> settings cause the hard disks to park their heads after a very short 
>> inactivity time.
>>
>> This hectic parking/deparking activity dramatically shortens the 
>> disk's life.
>>
>> Said manufacturers apparently take for granted that the OS will set 
>> more sensible power saving defaults for the hard disk. Linux distros 
>> often don't do this. So it's not exactly a "bug", rather an omission 
>> (even though it can be argued that this is not really "Linux's fault").
>>
>>
>> ----- DIAGNOSIS -----
>>
>> The continued parking/deparking is typically easier to detect on a 
>> laptop, where you might hear periodic "clicks" coming from the hard disk.
>>
>> A more reliable way is to watch the output of the following `sh` 
>> command line, to be issued as root while your system is AC powered (as 
>> opposed to battery powered) and not performing disk-intensive tasks:
>>
>> while true;do smartctl -a /dev/hda|grep Load_Cycle_Count;sleep 120;done;
>>
>> If the last number is constantly increasing every 1 or 2 lines, your 
>> system is affected.
>>
>>
>> ----- A SOLUTION -----
>>
>> The command:
>>
>> hdparm -B254 /dev/hda
>>
>> changes the primary drive's (/dev/hda) power settings to "almost never 
>> park heads". A lower number *might* be desired when running on 
>> battery, and an ideal solution would include a way to change that 
>> number according to power source (I don't know yet how to do this).
>>
>> For the moment, I suggest that the above command be put into 
>> /etc/rc.local to make sure it is executed at boot.
>>
>>
>> Best regards,
>> Andrea Remondini
>>
>>
>>
>>
>> ----- NOTES -----
>>
>> ¹ <https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695>
>> ² <http://hardware.slashdot.org/article.pl?sid=07/10/30/1742258>
> 
> 
> 
> This doesn't seem to work on my desktop system:
> 
> [root@localhost ~]# while true; do smartctl -a /dev/hdc |grep 
> Load_Cycle_Count; sleep 120; done;
> 
> [root@localhost ~]# df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/mapper/VolGroup00-LogVol00
>                       287G   34G  239G  13% /
> /dev/hdc1              99M   28M   67M  30% /boot
> tmpfs                 506M     0  506M   0% /dev/shm
> [root@localhost ~]#
> 
> 
> I left it more than 120 seconds.

There is the value:

  12 Power_Cycle_Count       0x0032   100   100   020    Old_age 
Always       -       157

though.

ATOM RSS1 RSS2