Reports of Ubuntu reducing hard drive lifespan

There was a story posted on Slashdot today with regard to Bug #59695 (No link, intentionally). Apart from the fact that it was extremely poor form to post a link to Launchpad thus slashdotting a major bug tracking tool, this issue should be addressed quickly. Here is the bug report:

When switching to battery power, /etc/acpi/ issues the command hdparm -B 1 to all block devices. This leads to extremely frequent load cycles. For example, my new thinkpad has already done well over 7000 load cycles — in only 100 hours. That’s at least one unloading per minute. Googling for “load unload cycles notebook OR laptop” shows that most laptop drives handle up to 600,000 such cycles. As these values clearly show, this issue is of high importance and should be fixed sooner rather than later.

Please see for yourself how often your drive is load cycling:
smartctl -d ata -a /dev/sda
(This command is for an SATA drive; you’ll need to install the smartmontools package first.)

See also for a rather dramatic account of the effects the current default values may have.

Just in case the load/unload timeout depends on the specific laptop or disk model, here are my system specifications:
ThinkPad Z60m & Hitachi HTS541080G9SA00 disk (80GB)

First off, Ubuntu does not alter power management options by default, they are left as the manufacturer set them. Aggressive power management can reduce the lifespan of hard drives so is not enabled by default in Ubuntu, of the people who are reporting this as a bug – the fact that it appears when resuming from suspend confirms this as Ubuntu doesn’t alter hard drive settings on resume, only on boot. Here is a comment from Matthew Garrett, head of the Laptop Team.

The number of load unload cycles that a hard drive is designed to withstand vary, with mine (Western Digital WD1600BEVS) the manufacturer quotes 600,000.

So how do you check and should you do anything about it? Well checking is easy, install smartmontools – open a terminal:

sudo apt-get install smartmontools

Next issue the command:

sudo smartctl -a /dev/sda | grep Load_Cycle_Count
sudo smartctl -d ata -a /dev/sda|grep Hours

In my example I get 29,751 cycles and 731 hours. This equates of course to approximately 41 cycles per hour. Now as the drive is quoted as 600,000 cycles this is equivalent to a lifespan (assuming an average of 5 hours use per day) of 204 cycles per day or 8 years. So I would say there is nothing to worry about.

Others argue that this depends greatly on the level of usage but we are talking about a laptop hard disk. Laptops are not typically used 24/7 – if it was then there would be an issue, as the lifespan would drop to 1.7 years.

So what to do if you think it is an issue for your hardware?

Edit /etc/hdparm.conf and add:

/dev/sda {
  apm = 255
  spindown_time = 0

As suggested by Kirrus, some machines will require 244 rather than 255.

Install hdparm init script:

sudo update-rc.d hdparm defaults

One Reply to “Reports of Ubuntu reducing hard drive lifespan”

Comments are closed.