Why is write speed 100 times slower than read speed for WD EIDE 500GB drive, and can it be fixed?
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Why is write speed 100 times slower than read speed for WD EIDE 500GB drive, and can it be fixed?
I don't need help recovering data from the drive. I want to know why writing is so slow and if there's anything I can do to get it to write at more reasonable speeds.
The drive is a Western Digital WD5000AAJB-00UHA0. It was the boot drive in an old 32 bit desktop computer built in 2002. The computer has been serving me well as a file, mail, and web server. It normally runs debian stretch, but there's also a debian wheezy partition I boot into to make full backups of the stretch partition. 4 days ago I discovered the drive had a bad sector causing read errors when a cron job tried to backup the wheezy partiton. And apparently the errors started 10 days ago (got to do something to monitor for such errors). Anyway, I restored the drive from backups, to another 500GB drive and swapped them.
I put the drive with the bad sector into my EIDE USB 2.0 enclosure, so I could run some tests. I captured smartctl -a output, which showed one "Current_Pending_Sector". I tried to write to it with linux shred, it took an hour to write a mere 2 GB. And the dd command could only write to the drive at about 700 Kbytes/sec, but it could read from it at about 70 Mbytes/sec.
So I moved the drive into a 64 bit computer from 2009 that has an IDE connector to see what Western Digital's Data Lifeguard Diagnostics (DLG) had to say. The drive passed both quick and extended tests. The extended test involves reading the whole drive looking for bad sectors. That took about 2 hours, which is consistent with a read speed around 70 Mbytes/sec. I tried DLG's "Write Zeros" test. After several minutes of writing, it estimated it would take 200 HOURS to complete the test, again 100 times slower to write than to read. So, I stopped the test.
I tried swapping IDE cables, both are 80 wire cables, as was the cable in the original computer. Same abysmal write speed and reasonable read speed. I tried moving the drive into a third computer, also circa 2009 with a yet another cable, and which already had a working EIDE boot drive (Hitachi 250GB). Both drives are now jumpered for cable select, and the boot drive is performing well. I re-ran the DLG quick test which passed, and re-tried the "Write Zeros" test. DLG again estimated it would take about 200 hours. And dd can only write at about 700 Kbytes/sec. Interestingly, smartctl now reports ZERO "Current_Pending_Sector".
i also have a cheap external usb WD drive, and i seem to remember something similar being the case. don't mind, it's just for storing data.
This is a 3.5" internal drive. I did not get it as an external drive, although I first detected the write speed problem while the drive was installed in a external USB 2.0 enclosure I bought without any drive pre-installed.
I found specs on cnet.com: https://www.cnet.com/products/wd-blu...-series/specs/
To summarize, it's interface is ATA-100, which also means it supposed to support a data transfer rate of 100 MBytes/sec. IOW, you should be able to read up to 100 MB/s and write up to 100 MB/s. I am seeing a read speed resonably close to the rated transfer rate. But the write speed is abysmal, over 100 times slower than the ATA-100 rating, and so slow, it's unusable. The write speeds I'm seeing are with the drive installed in a computer case, connected via an IDE cable to the motherboard. I took it out of the USB external case to rule out USB being the problem. And even when it was in the USB case, I should have been seeing write speeds around 30 MB/s over USB 2.0, nearly 50 times faster than the 700 KB/s I am seeing.
What write speeds are you getting with your external drive?
Writing to disk gets checked, (I think), whilst reading doesn't need to be, so reads will always be quicker.
I think I can safely rule out bus speed. Right now, the drive is installed in the same machine as a 250GB drive. Both are attached to the same IDE cable. I can write to an unsued partition on the 250GB disk (eliminating any buffering by the kernel) at around 50 MB/sec and to the problem 500GB disk at around 1 MB/sec. It's gotten faster, up from 700 KB/sec, but 1 MB/sec is still too slow to be useable.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.