HD Head Load Cycle Count ***WARNING***

Please post any bugs you have found
Post Reply
Message
Author
kethd
Posts: 451
Joined: Thu 20 Oct 2005, 12:54
Location: Boston MA USA

HD Head Load Cycle Count ***WARNING***

#1 Post by kethd »

There is a potential danger if Puppy Linux or many other OSes are installed on a laptop hard drive (2.5-in hard drive), of exceeding the rated life-time Head Load/Unload Cycle Count rating of the hard drive.

Modern laptop hard drives are typically rated for 200,000 to 600,000 head load/unload cycles. That may sound like a large number, but it is all too easy to exceed. In order to protect themselves from physical damage, some laptop hard drives automatically unload the heads whenever there has been no activity for 5 or 10 seconds. A standard Linux system writes to the hard drive a few times a minute continuously in the background. This combination is horrible, resulting in the head loading and unloading more than once a minute, whenever the computer is idling. (The problem does not occur when the computer is being actively used and the hard drive is being actively used -- in that case, the heads stay loaded.) Not only is the hard drive being degraded, but little benefit is being obtained, since the heads are loaded (and thus vulnerable) most of the time.

If there are 100 load cycles an hour, that is 2500 a day -- 75,000 a month. In less than a year the rated Load Cycle Count of the hard drive will be exceeded.

Puppy Linux HD Full Install has this problem. Frugal Install seems to avoid the problem. Perhaps because the writes are being done to a virtual file system in RAM, which only gets physically written to the hard drive when the system shuts down?

The Puppy Universal Installer script should be modified to notify all users installing to hard drive of this issue, and advise them to choose Frugal for laptop hard drive installs. Users who nonetheless choose Full Install should get a special warning script advising them to be sure to monitor the SMART parameters after installation, to check the Head Load Cycle Count. There may be ways to modify the installation to reduce the problem. This is a complicated subject, with no obvious good easy answers. It may be possible to keep the hard drive heads from unloading, with commands such as
* hdparm -B 254 /dev/sda
but this would make the laptop hard drive more vulnerable to damage every time the laptop is bumped. It also might consume more power and be hotter.

I discovered this problem by accident, testing out a new laptop hard drive that makes a noticeable, annoying little noise every time the heads load and unload. In just a couple days of doing Puppy test installs, the Head Load Cycle Count has zoomed to over 1500. It goes up by almost 2 a minute, whenever I leave the 4.2.1 HD Full Install idling.

This experience has taught me to be paranoid, to resolve to always check the count over the first few days, after installing ANY OS on a hard drive. The main general purpose tool for checking this parameter is smartmontools. It is available as a pet package. It seems like it needs to either be a part of the standard distro, or at least a part of the official package repository.

All Puppy users need to be warned that if this parameter (#193) is over 10,000 or increasing significantly from day to day, they have a problem that should be addressed.

(This same laptop, running Vista on the previous Toshiba 200GB hard drive, did 7691 load/unload cycles over 2783 Power_On_Hours in one and a half years -- an average of less than 3 per hour!)

See also:

* http://ubuntuforums.org/showthread.php?p=5031046
laptop harddrive Load_Cycle_Count issue

* http://www.thinkwiki.org/wiki/Problem_w ... e_clicking
The clicking sound appears to only occur when the drive is idle.
Many daemons poll (config) files every few seconds. Despite files being cached, POSIX-compliant filesystems like ext2 or ext3 must update (=write) the last access time.

* http://www.thinkwiki.org/wiki/Laptop-mode
An often overlooked feature in 2.4.23+ and 2.6.6+ Linux kernels is the laptop-mode. It may be activated by writing a "5" into /proc/sys/vm/laptop_mode. Laptop-mode, when configured correctly, can make the kernel buffer disk activities for quite a long time and keep the harddisk spun down for most of the time to save power.

* http://wiki.archlinux.org/index.php/Lap ... wn_problem
Disable file access time: every time you access (read) a file the filesystem writes an access time to the file metadata. You can disable this on individual files by using the chattr command, or you can enable it on an entire disk by setting the noatime option in your fstab, as follows:
/dev/sda1 / ext3 defaults,noatime 1 2

* http://hardware.slashdot.org/article.pl ... 58&tid=198
Ubuntu May Be Killing Your Laptop's Hard Drive
"There's a debate going on over at bugs.launchpad.net on whether it's the Ubuntu, BIOS, hard-drive manufacturer, or pick-any-player's fault, but Ubuntu (and perhaps any OS) may be dramatically shortening the life of your laptop's hard drive due to an aggressive power-saving feature / acpi bug / OS configuration. Regardless of where the fault lies or how it's fixed, you might want to take some actions now to try to prevent the damage."

The main problem is a combination of the short spindown time, and something wanting to write out to the drive every 30 seconds or so. The main culprit could be the fact that by default, a files last access time (atime) gets updated on every read, even if that read comes from cache. So when the drive is spun down, it gets spun up even on cached reads (to write out the atime).
Add "-o noatime" to the filesystems in /etc/fstab, and that should clear up the issue.

* http://bbs.archlinux.org/viewtopic.php?id=66706
If linux tends to write to /var/log/* every 30s, then the heads can park/unpark every 30s. If you had a service in windows that wrote to the disk at fixed intervals greater than the disks max idle period, you would have the same issue.

* http://www.thinkwiki.org/wiki/How_to_re ... ard_Drives
The files access time update, while mandated by POSIX, is causing lots of disks access; even accessing files on disk cache may wake the ATA or USB bus. If you don't use this feature, disable it via:
mount -o remount,relatime / # and so on for all mounted fs

* http://samwel.tk/laptop_mode/
* http://samwel.tk/laptop_mode/packages/ubuntu

===
HD Idle Activity bug - Full Install

There is a problem in current versions of Puppy Linux with inappropriate idle hard drive activity -- only for Full Install, not for Frugal Install.

This problem occurs with 4.2.1, and also with MiPup2 (412?).

A fresh HD Frugal Install of 4.2.1 has occasional (unnecessary?) hard drive activity for about one and a half minutes after booting to idle desktop. It then settles into proper total quiet inactivity.

A fresh HD Full Install of 4.2.1 continues indefinitely to have a few HD accesses per minute, somewhat irregular timing. This is mysterious and definitely undesireable. Do we know why? Do we know how to fix this? How to troubleshoot?

It might be generally important to understand this problem -- we want Puppy to run as perfectly as possible on many different storage media, and we don't want to wear anything out more than we have to. With flash drives etc it might be harder to be aware of inappropriate access activity.

Background/context/additional info:

Tested on Toshiba Satellite A215-S7437 laptop, with new Western Digital Scorpio Black WD2500BEKT 250GB 7200 RPM 16MB Cache 2.5" SATA 3.0Gb/s Internal Notebook Hard Drive. This is a fast modern over-powered laptop with 2GB of DDR2 RAM, so it has no excuses for any extra HD activity.

The hard drive was formatted to one 7GB ext2 partition, with GRUB in the MBR, and acpi=off needed for successful boot.

The WD2500BEKT hard drive is mostly nice fast quiet etc. But it has an awkward characteristic that makes this HD activity problem annoyingly obvious. Whenever the drive is unused for 5-10 seconds, the heads unload automatically and make a small audible snickery-pinging noise. Then whenever the next access happens, there is a similar (though slightly different) head load noise. As long as frequent drive activity continues, everything is very smooth, the activity sounds very minor. But as soon as over five seconds pass without activity, another audible unload happens. The Puppy Full Install idle activity pattern, a few times a minute, generates a maximal adverse number of unload-load noise cycles, a few times a minute.

This annoying little noise is sort of a "lucky accident", a way of detecting some unneeded HD accesses that we would like to get under control.

When 4.2.1 is run from pure LiveCD on the same laptop, the HD is quiet with no activity after booting to the desktop, with the hard drive unmounted. When the hard drive is mounted, there is noisy activity about every 15 seconds (why?) for about two minutes, and then things are quiet.

With MiPup2 HD Full Install, the HD behaves in a similar fashion. As long as there is plenty of frequent HD activity doing real work, everything is fine and subdued. But when the system is left idle, there is HD occasional activity, at least a few times a minute, and audible HD load/unload noises.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#2 Post by mikeb »

Why frugal behaves better...

Code: Select all

/dev/loop0 on /initrd/pup_ro2 type squashfs (ro,noatime)
/dev/hda3 on /initrd/mnt/dev_save type ext2 (rw,noatime)
/dev/loop1 on /initrd/pup_rw type ext3 (rw,noatime,data=ordered)
might be why...since noatime is commonly cited as one way of alleviating the problem.

I have a full install of 4.12 on a netbook and indeed that hard drive gives thos regular clicks.

Thankyou for an interesting article(?)..definately needs investigating

regards

mike

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#3 Post by mikeb »

Ok 4.12 full install

modded /etc/rc.d/rc.sysinit line 49 to
[! -d /initrd ] && busybox mount -o remount,rw,noatime

the clicking has gone from every ~5 seconds to every ~30 seconds with the hd light flickering at the original rate ie 5secs

Did it this way as fstab seems to be ignored.

So definately a significant improvement...perhaps /proc and /sys need the treatment.

mike

kethd
Posts: 451
Joined: Thu 20 Oct 2005, 12:54
Location: Boston MA USA

hard drive install of Ubuntu 9.04

#4 Post by kethd »

I just did a normal hard drive install of Ubuntu 9.04 on the same laptop and hard drive. Everything went pretty smoothly, and the hard drive has been almost too quiet (aside from some serious momentary isolated hard clunking-type noises while it was working hard to install to the hard drive). It seems that Ubuntu has done something to "solve" the laptop load/unload problem. This installation has been running over an hour, a number of restarts, and has not incremented the load cycle count at all! It would be educational to know what they have done. It does not seem like quite the right solution -- they seem to have completely disabled the shock protection, just running the drive continuously loaded. And it does seem like the drive is running hotter, perhaps by 5-10 deg C.

It seems to be conventional wisdom that heat is very bad for hard drives. But the key white paper from google about their server farm experiences does not seem to support the temperature theory, so I don't know what to believe.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#5 Post by mikeb »

they seem to have completely disabled the shock protection, just running the drive continuously loaded.
well that indeed would cure the clunks but not the most efficient approach.
I will further investigate what is accessing the drive in puppy though the atime adjustment does help

regards

mike

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#6 Post by Patriot »

Hmmm .....

I have something to say :

1. The head (parking) load/unload clicking issue is not about "shock protection system" per se.

2. Hdd head parking (load/unload) is a standard feature that have been in use for decades.

3. Whenever a hdd spins down, the head MUST be unloaded (or parked). It cannot be left on the (user area) platter. This is to avoid the head scratching the (user area) surface during spin-up.

4. Previously, head parking is done by placing the head on an unused location.

5. Eventually, head parking is moved off platter to avoid head backlash/damage/fill-in-the-blanks. This is true for any recent notebook hdd models in the last decade.

6. Spinning down the hdd on a laptop reduces power usage. Reduced power usage equals to longer computing time on a single charge.

7. Thus we get the by-product of spinning down the hdd which is head parking. (The head cannot be left on the platter, remember ?)

8. All hdds have spin down timer that can be set. It can be turned on or off.

9. Apart from internal hdd factory preset (which is usually a sane general preset), the spindown timer can also be configured in BIOS, OS kernel, OS utility and end-user utility. The hdd will follow the last directive given to it (if available).

10. This issue have been seen since win95 days but hdd failure is becoming more pronounced nowadays due to various other reasons. No, no need to be overly paranoid with this.

11. Set a comfortable hdd sleep timer. Ex: 45 mins when idle on AC + 15min when idle on battery or none at all.

12. Try to understand why the feature is there in the first place and then fine tune the feature.

13. Logic :

Code: Select all

IF (still paranoid with head load/unload) THEN
  use SSD
  head load/unload issue closed
ELSE
  fine tune to comfortable level
  proceed using system as normal
  make backups when required
ENDIF

Thank you for your time.

Rgds

kethd
Posts: 451
Joined: Thu 20 Oct 2005, 12:54
Location: Boston MA USA

#7 Post by kethd »

I'm quite sure the drive is not spinning down. The heads are just continuously loading and unloading.

This is a new laptop hard drive and the latest stable Puppy, all on default settings.

I know what is happening is wrong and stupid. I don't know if it is a newer problem or a been-around-for-many-years-or-decades problem. It seems to be new-ish because it is sort of specific to laptops. 3.5-in hard drives are not set to default to unload the heads after just 5 seconds, because shock protection is not a primary operating concern in that form factor.

I don't know if the problem is seriously bad or just somewhat annoying. But as a paranoid person, it gives me the creeps. I've been using smartmontools for years, but mostly looking at the Reallocated Sectors Count. Just recently learned to care even more about the Current Pending Sector Count. Now I need to go back through all the computers I try to take care of and ponder what is going on with the Load Cycle Count...

(Yes, I did actually start this failing-laptop-hd-replacement project by researching SSD. But it is not only still much too expensive, but seems to have very serious compatibility/reliability issues. Looks like it'll still be too bleeding-edge for me for at least another couple years, unless I buy a new netbook that comes with.)

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

#8 Post by rjbrewer »

I have a clickety hard drive going bad. It started losing sound
and xvid functions on the 3 puppy installs on the 10 gb drive.

It's an old travelstar; at least 7 years old; must be far beyond
it's rated "duty cycle" by now.

Stuck in a 10 yr. old 3 gb fujitsu drive as a replacement.
It doesn't make any clickng sounds at all!
Working fine so far.

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#9 Post by Patriot »

Hmmm .....
kethd wrote:I'm quite sure the drive is not spinning down. The heads are just continuously loading and unloading .....
If that is true, then the hdd is encountering track seek error. Frequent head clicking during normal OS operation is an indication of this. Reallocated/Pending sector will show non-zero and may be increasing.

Added: I've just remembered one experience a long time a go with a toshiba 100cs (yeah, wfw 3.11), the hdd was clicking every 15 secs or so after idle. I recalled adjusting sleep idle timeout to 15 mins to stop the clicking. I now also recalled that on certain hdd model, the head kept moving during idle to avoid wearing out the surface.
kethd wrote:..... 3.5-in hard drives are not set to default to unload the heads after just 5 seconds, because shock protection is not a primary operating concern in that form factor.....
Correct, desktop drives normally have sleep timers disabled but shock protection system (SPS) is a primary concern on any hdd form factor. I've been aware of SPS designs since the days of Quantum Fireballs.

Hdd heads will not park (unload) without spinning down. Of course, there's a possibility that a sleep command is issued and the head unloads then immediately followed by a seek command which loads the head (but I haven't seen one yet). Any other head clicking during spinning points to other issues.
kethd wrote:..... I've been using smartmontools for years, but mostly looking at the Reallocated Sectors Count. Just recently learned to care even more about the Current Pending Sector Count. .....
Yes, s.m.a.r.t. indicators are helpful ... but not absolute nor 100% accurate. For instance, the reallocated sectors count is highly model dependent. On some models, the max value is about 600 sectors and on others they're as high as 1600 sectors. Current pending sector is an indication of unstable/unconfirmed sector errors encountered by the drive and is a temporary list until verified to be hard errors to be moved into reallocated sector list. The only way available to end-users to "fix" this is by doing a hdd zero-fill procedure (ie. writing zeros to the entire hdd. This is usually the standard procedure offered by manufacturer's utility).
kethd wrote:.....Yes, I did actually start this failing-laptop-hd-replacement project by researching SSD. But it is not only still much too expensive, but seems to have very serious compatibility/reliability issues.....
Specific SSD (solid state device) are expensive. Reliability of SSD depends on the model and usage intention. There are other more cost effective solutions. I've recommended the use of high speed quality CF cards with suitable ide/sata adapter for notebooks to many people (experiencing hdd failures) with good results. They're robust and shock proof. Quality CF cards reliability is pretty good in my opinion and personally, my CF card that's being used in my router box is still working fine after 4 years plus ...

Something that the majority of end-users are taking for granted is the handling of their mobile hdd hardware.

Harddisks nowadays are sold in the hundreds of gigabytes of storage per device. This comes with a price (as with anything else). They are now packing between 4x to 8x more bits onto the same square inch of platter surface. This extremely high density makes head alignment a very sensitive issue. The head pickup is now tuned to a read at a more precise location and the read/write path is now much much more narrower. A slight bump/jar during operation can cause a misalignment. If such a bump/jar/misalignment occurs during a write, it can be disastrous for a hdd.

Even with all the precautions and safety measures already implemented into a hdd design, failures still happens.

So, still want to play with the sleep timers ?

open a terminal and :
hdparm -S 0 (disable)
hdparm -S 1-240 (is calculated as n * 5secs)
hdparm -S 240 (for 20minutes sleep after idle timeout)
hdparm -S 241 (for 30mins)
hdparm -S 242 (for 60mins)
hdparm -y (put drive into standby. may/may not be required)

ex: hdparm -S 241 /dev/sda - to set primay hdd to 30mins timeout.

As usual, do at your own peril. Do note that while these values are the standards, the actual value may depend on the specific models in use (especially older ones). Command issued will remain effective until the next command is given.

Rgds

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#10 Post by mikeb »

Well I definately found adding noatime made a difference...newer puppies have daemons for mount icons amongst othere things with a cyle of 2 and 4 seconds.This is on a HP 2133 which is 3 months old so not yet at the wearing out stage. Also a full install of puppy 2.12 has no such regular drive accesses at idle.

Parking during idle periods for battery saving and shock tolerance or never parking to deal with regular file accesses is the compromise it seems.
Or modify the daemons ....

mike

Post Reply