Default HD power management settings will kill drive

Bug #104535 reported by Bart Samwel
30
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

I run feisty (beta) on a Dell Inspiron 9400 with a Hitachi HTS541616J9SA00 hard drive. After booting, the drive's power management settings are such that it spins down A LOT. To give you some statistics: the drive is rated for 600,000 load/unload cycles, and after 2.5 months of running Feisty I'm already at more than 56,000 load/unload cycles (and only 150 power cycles), according to the SMART data. At this rate the drive will be dead after 2.5 years, and I don't even use this computer for more than a couple of hours each day. The fix? I have to do:

hdparm -B 255 /dev/sda

and the spinning-down stops. I don't know what certain other OSes do with their drives at bootup, but the current behaviour is certainly deadly for the drive. Worse: nobody will notice, since smartmontools aren't installed by default. I noticed frequent clicking sounds earlier, but I didn't think those were spindowns since I hadn't specifically set the drive into any low-power mode. I only noticed this by accident after I got smartmontools working.

Revision history for this message
NickB (nickbucci) wrote :

Running Feisty, Dell XPS M140, with a Hitachi HTS541060G9AT00. Same situation, always noticed LOTS of spindowns but never thought much until it started really bugging me. Installed smartmon and found 154153 load cycles with 308 power cycles.

Running hdparm -B 255 /dev/sda has fixed it for the time being.

Revision history for this message
Rami Autiomäki (rami-autiomaki) wrote :

Confirmed here on Gutsy and HP Omnibook VT6200.

Revision history for this message
TDB (michael-baranov) wrote :

Same on Gusty tribe 2 on Toshiba P205. See also: https://bugs.launchpad.net/ubuntu/+source/acpi-support/+bug/59695

Revision history for this message
xtknight (xt-knight) wrote :

Still an issue in latest Gutsy?

Revision history for this message
Bart Samwel (bart-samwel) wrote :

Well, acpi-support 0.103 still does (in power.sh):

$HDPARM -B 1 /dev/$drive 2>/dev/null

when laptop mode is enabled. This is sure to trigger the problem, so I don't think it's fixed.

Revision history for this message
Mike C. (launchpad-christiansons) wrote :

I am also experiencing this issue on my Dell Inspiron 6400.

According to smartctl, my load cycle count is 73,603. Now, I’ve had my 6400 for five months, so that’s ~484 cycles per day. At this rate my hard drive (HTS721010G9SA00) will “last” ~3.5 years.

Revision history for this message
Johnathon (kirrus) wrote :

Marking as a duplicate of bug #59695.
Please feel free to report any more bugs you find.

Revision history for this message
PowerUser (i-am-sergey) wrote :

Just to let you know: Hitachi uses quite special own technology to park HDD heads outside of magnetic disks area to a special parking ramp. This causes HDD heads not to suffer from parking - they're NEVER land on disk surface during parking. So, actually, Hitachi HDDs can handle a LOTS of starts\stops without any real problems (a bit like CD\DVD drives do). Hitachi even recommending aggressive power management on their own to certain degree due to this fact. However well, stopping HDD every minute is an overkill anyway. And yes, not each and every HDD has such wonderful heads parking system.

You can read more in following whitepaper:
http://www.hitachigst.com/tech/techlib.nsf/techdocs/9076679E3EE4003E86256FAB005825FB/$file/LoadUnload_white_paper_FINAL.pdf

Revision history for this message
danmb (danmbox) wrote :

I'm having the same problem with a Dell Inspiron 1520. Only hdparm -B 254 works.https://launchpad.net/bug59695.html

A quick note: https://launchpad.net/bug59695.html ranks much higher in Google for relevant searches, and is obviously out of date. It also doesn't allow comments (of course -- it's a static HTML page). Very confusing for lots of people.

Funny that the bugtracker itself has become a nightmare to use. No, it's not reasonable to expect people to figure out a related URL from the bug number. It's also not normal that there's no "Go to specific bug number" option (or if there is, it's well hidden).

Revision history for this message
Brian Ealdwine (eode) wrote : Re: [Bug 104535] Re: Default HD power management settings will kill drive
Download full text (3.7 KiB)

That bug (#59695) was hit by slashdot. It is more relevant, but has
been replaced by a static html page because of the excessive traffic.
I think that is stated earlier in the bug.

At this point, there is enough information to solve the bug, or at least
to prevent damage to peoples' systems. This is as clear of an overview
as I can provide in the time I have right now:

- Some hardware vendors set default settings that require certain
behaviours of the operating system -- namely, disk access that is
relatively infrequent (once or twice every five minutes when idle), or
disabling/lessening the aggressiveness of Advanced Power Management
(APM). If neither of these occur, the hard drive will definitely
(although slowly) be damaged by wear.

- It is apparently the policy of Ubuntu not to mess with hardware
default settings, unless there is some particular purpose. This has not
been considered an important enough issue to warrant changing the
default settings, but this is ideally due to a lack of understanding of
the real issue (as knowledge can be conveyed).

- Ubuntu accesses the hard disk at least every 30 seconds. This where
Ubuntu runs into problems.

- Many hardware vendors default to aggressive APM, and Ubuntu keeps that
setting, even while not on battery power.

- Disk Load Cycle Count is the number of times the disk's read/write
heads have been parked and unparked. Parking the heads is both a power
saving feature, and (somewhat ironically) a protection against physical
impacts -- because of the latter, it is desirable (but not absolutely
necessary) to keep the heads parked as much as possible.

- Most laptop drives are rated at around 600,000 load cycles
(approaching this number is approaching disk failure). This number is a
common number retrieved from various HD specs, such as my own --
http://www.wdc.com/en/library/portable/2879-001121.pdf Desktop drives
may be more robust, I'm not sure.

- Because of the combination of aggressive power management and frequent
disk activity, the hard disk heads are parked and unparked at least
twice a minute on systems with aggressive APM enabled.

- 2 parks per minute * 60 minuts per hour * 24 hours per day * 365 days
per year = 1,051,200 -- significantly above a typical rating for a disk.
Of course, this is referring to the time the computer is actually
running, not off time.

The solution is simple, at least in description:
- To ease the minds and hardware of the users, release a package that is
a temporary fix which sets the APM setting to be much less aggressive --
at least to the point where the disk will wait for at least two minutes
of inactivity before parking. Actually, setting it to wait longer than
~35 seconds will prevent the disks from parking at all, because of how
often Ubuntu accesses the disks. This is quite simple to implement and
release an update for.

- Then, research and prevent unnecessary disk access, either through the
Laptop Mode tools and kernel settings, or through finding the
applications/processes that are touching the disk on a regular basis,
and modifying them to do so less often. acpid is one such process (it
unnecessarily logs quite a bit on quite a ...

Read more...

Revision history for this message
Ryiden (hansgeorg-schwibbe-googlemail) wrote :

I have created an installation script to fix the power management problem, just call:
hdparm-apm-fix.sh /dev/sda install
or
hdparm-apm-fix.sh /dev/sda remove

Revision history for this message
Akshay Srinivasan (akshay.srinivasan) wrote : Re: [Bug 104535] Re: Default HD power management settings will kill drive

I was wondering if we could emulate the condition in Windows.So I left
the disk in (128) , and wrote a script to run smartctl every 7 secs (
the disk head parks after 8).And this actually worked.I was having
temperatures of about ~43-45 Celsius , without the disk head ever
getting parked.I think the Power Management value modifies the Voltage
parameters in the hard disk.

Here's the script ...

#!/bin/bash
while : ;
do
smartctl -a /dev/sda | grep Load
sleep 7
done

P.S-You are supposed to run it with sudo

Revision history for this message
DarkCthulhu (anirudh4444) wrote :

Finally, i solved it on my dell studio 1555. First, gksudo gedit /boot/grub/menu.lst. And edit it by adding 'noapic' without quotes at the end of the boot loader entry for the os, after 'ro quiet splash'. Then, run sudo update-grub. Then, edit /etc/laptop-mode.conf and change enable_laptop_mode_on_battery to 0. Then, edit all files of the form, /etc/acpi/*.d/90-hdparm.sh, and replace the line following if ["$State"="battery"] then;
hdparm -B 254 $dev
Else
hdparm -B 254 $dev. Thats all.. The noapic solves the dell studio ubuntu problem of not recognizing ac adapter, no changing brightness, closing lid lcd switch off, and elect key. Try it and let me know!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.