Last update on .

UPDATE (TL;DR) Given somewhat recent activity in comments area, figured I might fix formatting of the post and provide a small update.

In short, Western Digital disks ship with a feature that might reduce the lifetime of your disks (original idea being to reduce power consumption). This happens because of how often the disks park the head. There is a limit on how many parkings can be done before facing possible issues. Although the number is rather high, it can be reached potentially quickly. Depending on how lucky you are, you may or may not have issues. I had issues with my original disks described within this article.

To tweak how often the head will park, you can nowadays use native Linux tool from http://idle3-tools.sourceforge.net/, instead of downloading a DOS tool from Western Digital website.

Continue to read if you want to know more :)

Somewhere in October last year I've assembled myself a nice little home server which was meant to be as silent as possible. The reason for this was that the server is basically located in my bedroom, and I didn't want the noise from all the fans and hard-disks to annoy me. In order to achieve this I've assembled a nice little machine with a Gigabyte motherboard with a dual-core Atom, Antec case, and two Western Digital Green series hard-disks. This all sounds quite nice and all, until I discovered a shocking truth about the above hard-disks - the hard way...

About a year or so later, I've noticed that my ssh logins to the home server take a substantial amount of time. I've also noticed that the servers seems to behave rather poorly when accessing data on it. After some time of negligence, I've finally tried to research what the problem might be and if anyone else on the Internet has had a same problem. Several very vague searches later, and I've pinpointed the issue to two possible problems. The first was that Western Digital has been switching over to the 4KB physical sector sizes instead of the traditional 512 bytes. This means that if you don't align the partitions properly, you might end-up with big performance penalties. Alas, this was not the problem that I faced myself.

The second problem mentioned was that WD Green series attempts to save power and reduce noise by parking the head of the hard-drive. This feature sounds all great and nice, and actually useful for my intention of keeping the server as silent as possible, except for one tiny problem... This parking happens every 8 seconds of idleness. On the other hand, the Linux kernel likes to access the hard-disk for something like every 30 seconds... In other words, the head gets constantly parked and loaded. Now comes the juicy part... According to Western Digital specs, the number of allowed head load/unload cycles during the lifetime of a hard-disk is 300.000. Lets get some simple maths into all this. The smallest whole number which contains whole parts of numbers of 30 and 8 (forgive my lack of knowledge of English mathematical expressions) is 120. We have 4 30-second cycles in 120 seconds. The number of load/unload cycles is times two, which brings it to 8 cycles per 2 minutes. This is 240 cycles per hour, 5760 per day, 172800 per month. Therefore the load/unload cycle limit is reached in less than two months. Frightening, isn't it? This means that after two months of usage, you have a very strong possibility of loosing the hard-disks and the data on them.

Of course, this calculation is highly pessimistic since it assumes that hard-disks are idle all the time (which is usually not the case) - although it could be even worse depending on the alignment of the 8s and 30s cycles. In case your hard-disks are constantly being read from and written to, the issue will not rear its ugly head. But, in my case, since it's a home server that sometimes remains idle for quite a lot of hours, it happened rather soon (although not as fast as the above two months).

Once I became aware of the problem, I've tried to figure out the number of load/unload cycles on my hard-disks. The command I used was:

? root
smartctl -a /dev/sda | grep Load

I can't recall what the exact value was, but it was freaking huge, something in the range of 700.000. After finding out about it, I tried to find a way to disable this fancy IntelliPark feature (or should it be called DumbPark?) and ran into several articles mentioning the use of hdparm -S command. Upon obtaining new hard-disks (yes, I've bought WD Green series again, this time the 2TB versions) and migrating my home server to them, I've used the command to prolong the standby mode to something like 5 minutes or more. I've also setup a small cronjob to run the following script and append its output to a log file:

#!/bin/bash

echo "$(date '+%F %T') sda $(/usr/sbin/smartctl -a /dev/sda | grep Load | awk '{print $10}')"
echo "$(date '+%F %T') sdb $(/usr/sbin/smartctl -a /dev/sdb | grep Load | awk '{print $10}')"

These are the results of this operation:

2010-11-22 08:00:01 sda 110
2010-11-22 08:00:01 sdb 113
2010-11-22 09:00:01 sda 114
2010-11-22 09:00:01 sdb 118
2010-11-22 10:00:01 sda 114
2010-11-22 10:00:01 sdb 118
2010-11-22 11:00:01 sda 114
2010-11-22 11:00:01 sdb 118
2010-11-22 12:00:01 sda 114
2010-11-22 12:00:01 sdb 118
2010-11-22 13:00:01 sda 114
2010-11-22 13:00:01 sdb 118
2010-11-22 14:00:01 sda 114
2010-11-22 14:00:01 sdb 118
2010-11-22 15:00:01 sda 114
2010-11-22 15:00:01 sdb 118
2010-11-22 16:00:01 sda 114
2010-11-22 16:00:01 sdb 118
2010-11-22 17:00:01 sda 121
2010-11-22 17:00:01 sdb 125
2010-11-22 18:00:01 sda 237
2010-11-22 18:00:01 sdb 245
2010-11-22 19:00:01 sda 370
2010-11-22 19:00:01 sdb 380
2010-11-22 20:00:01 sda 495
2010-11-22 20:00:01 sdb 502
2010-11-22 21:00:01 sda 634
2010-11-22 21:00:01 sdb 636
2010-11-22 22:00:01 sda 975
2010-11-22 22:00:01 sdb 972
2010-11-22 23:00:01 sda 975
2010-11-22 23:00:01 sdb 972

Notice that between 08:00 and 17:00 the number of load/unload cycles has increased only by a little. During this time I had some downloads running which kept the hard-disks busy. As soon as disk activity ceased, you can see the numbers jumping up quite rapidly. I was quite discontent with this, and after some searching I ran into utility issued by WD for increase the period for parking the head or disabling it altogether. The utility can be downloaded from http://support.wdc.com/product/download.asp?groupid=609&sid=113.

Now, the moment you unpack it or read the description at the page you'll find out another idiotic truth... The utility is meant to be used under DOS. Yes, under freaking ancient DOS! And the instructions on the page don't even try to go into detail on how to actually boot a DOS system on a modern machine. The least they could've done was to create an ISO image that users could download, burn to CD, and boot from in order to start the utility. Instead they decided to leave it up to users to do this all by themselves. Luckily enough, there's enough how-to's and tutorials on achieving this. I felt a bit lazy, and after one more search ran into the following page:

http://www.linuxconfig.org/how-to-get-wdiddle3-to-set-iddle-timer-for-wd-ears-drive

Although I'm grateful to the author of the article above, I found the instructions within the comments section by Bruno Luna much faster and (at least for myself) simpler.

Just in case that this page goes to hell with a poof, I'll repaste his instructions here:

Thanks for the post, it was useful for me. But I used an alternative that I
think it is easier. It requires just a usb stick.

1 - Download unetbootin:
'sudo apt-get install unetbootin' or direct from www.unetbootin.sourceforge.net

2 - Start the application. Select FreeDos as distribution in the main
dialog. Your USB stick will probably be already selected in the lower dialog,
if not, do it (remeber to format it first as FAT).

3 - The application will automatically download and install the odin version
of freedos(just 1,4MB!). It will also make your usb bootable.

4 - Copy the wdidle3.exe to the usb stick.

5 - Reboot the system with the usb stick as first boot alternative. When asked
select the live CD version of freeDOS.

6 - In the prompt type c:, so that you get to the root of the usb stick. Then
type as usual wdidle3 /S255 and that's it!

I've had some issues while trying to boot FreeDOS on this particular machine until I selected the FreeDOS safe mode. Additionally, instead of setting the timer to a higher value, I've opted to use the /D flag and disable the feature altogether. After a reboot I've also had some trouble with Debian Lenny booting up and initialising very slowly, so I powered down the machine and started it again. The system came up quickly and after one more poweroff and repositioning of server into my room all was done.

I've let the system idle for an additional hour and checked the log file with recorded load/unload cycles. It had shown no change in numbers, which I wholeheartedly found to be a good thing. I'll try to let it run some more and post an update regarding the results I obtained.

As a final word I must say that I'm very disappointed by the way Western Digital seems to have behaved with regard to this issue. It is my strong opinion that they should have made the issue publicly known and informed users in a more proper way on how to solve the issue at hand. They also should've made complete instructions on how to tune the hard-disks. Let's not forget about the fact that they also decided to circumvent standard tools like hdparm/sdparm for changing these parameters, and instead opted for their own utility that runs only under an ancient operating system.

UPDATE

Ok, I've let the system run for a while with the Load/Unload cycle logger, and here are the results:

2010-11-23 00:00:01 sda 975
2010-11-23 00:00:01 sdb 972
2010-11-23 01:00:01 sda 975
2010-11-23 01:00:01 sdb 972
2010-11-23 02:00:01 sda 975
2010-11-23 02:00:01 sdb 972
2010-11-23 03:00:01 sda 975
2010-11-23 03:00:01 sdb 972
2010-11-23 04:00:01 sda 975
2010-11-23 04:00:01 sdb 972
2010-11-23 05:00:01 sda 975
2010-11-23 05:00:01 sdb 972
2010-11-23 06:00:01 sda 975
2010-11-23 06:00:01 sdb 972
2010-11-23 07:00:01 sda 975
2010-11-23 07:00:01 sdb 972
2010-11-23 08:00:01 sda 975
2010-11-23 08:00:02 sdb 972
2010-11-23 09:00:01 sda 975
2010-11-23 09:00:01 sdb 972
2010-11-23 10:00:01 sda 975
2010-11-23 10:00:02 sdb 972
2010-11-23 11:00:01 sda 975
2010-11-23 11:00:01 sdb 972
2010-11-23 12:00:01 sda 975
2010-11-23 12:00:02 sdb 972
2010-11-23 13:00:01 sda 975
2010-11-23 13:00:01 sdb 972
2010-11-23 14:00:01 sda 975
2010-11-23 14:00:02 sdb 972
2010-11-23 15:00:01 sda 975
2010-11-23 15:00:01 sdb 972
2010-11-23 16:00:01 sda 975
2010-11-23 16:00:02 sdb 972
2010-11-23 17:00:01 sda 975
2010-11-23 17:00:01 sdb 972
2010-11-23 18:00:01 sda 975
2010-11-23 18:00:02 sdb 972

In other words, the utility did the trick and there's not head-parking anymore.

Pingbacks

Pingbacks are closed.

Comments

  1. on #

    title DOS622
    root (hd0,1)
    kernel /dos/memdisk
    initrd /dos/dos622.img
    boot

    get memdisk from /usr/share/syslinux and dos622.img is any bootable dos/fat image.

    HTH
    Paul

  2. Head Thrasher

    Head Thrasher on #

    I only learned about this now.

    I've got 7 year old WD Green 2 TB drives in my home theatre PC which are still working. I didn't use the second drive for the first two years or so...have a look at their "Load" counts!

    <code>193 Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 2,552,718
    193 Load_Cycle_Count 0x0032 001 001 000 Old_age Always - 1,113,821</code>
    (I added commas to make the size of the numbers stand out)

    Could you please update the link to the WD software?
    Preferably to the specific page which contains the download, not the download link itself?

    Thanks!

  3. Head Thrasher

    Head Thrasher on #

    PS: I use a rare PC case which suspends the hard disks on elastic. This means there is no drive noise and I've never heard the heads "click"!

  4. Head Thrasher

    Head Thrasher on #

    Firstly this page:
    http://www.instantfundas.com/2011/12/intellipark-makes-western-digital-green.html
    suggests "WD Green Drives are designed to last for 1 million parks or Load Cycles." not 300 thousand as you've said. My drives are still 2 times over that mark!

    Also this thread states that modern versions of the hdparm utility can fix the problem, no horrible DOS utilities required:
    https://bbs.archlinux.org/viewtopic.php?id=196821

    I realised after writing my first message that using commas in a number may be confusing for europeans! Please take them out if it helps others.

  5. Branko Majic

    Branko Majic on #

    Hi,

    First of all, sorry for borked formatting of comments etc, I was a bit sloppy with content migration from Drupal :)

    I added a small section at top stating that people should be able to use different tool for tweaking the settings (idle3-tools). Figured no need to bother with the original tool anymore, given that a better native version is available (plus couldn't figure out where the heck the host the tool anymore).

    As for number of load cycles, I think the original number I got somewhere from WD website, possibly related to what the warranty covers, iirc (it was long time ago). So, could be they are designed for more, but I think if you exceeded some much more conservative value your warranty might be void. This is purely theoretical, of course, since I haven't tried to return the disks :)

Comments are closed.