LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-14-2018, 06:48 PM   #1
faginbagin
LQ Newbie
 
Registered: Nov 2007
Distribution: Debian, Ubuntu, Mythbuntu
Posts: 15

Rep: Reputation: 5
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".

Why is writing so slow?

Can it be fixed?
 
Old 09-15-2018, 04:43 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,413
Blog Entries: 7

Rep: Reputation: 2334Reputation: 2334Reputation: 2334Reputation: 2334Reputation: 2334Reputation: 2334Reputation: 2334Reputation: 2334Reputation: 2334Reputation: 2334Reputation: 2334
what does the drives data sheet say about this?

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.
 
Old 09-15-2018, 10:51 AM   #3
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Tiny Core, Debian based (Raspbian, RasPiDeskop), & sometimes OpenBSD
Posts: 2,540

Rep: Reputation: Disabled
Might also be down to the bus speed.

Writing to disk gets checked, (I think), whilst reading doesn't need to be, so reads will always be quicker.
 
Old 09-15-2018, 08:28 PM   #4
faginbagin
LQ Newbie
 
Registered: Nov 2007
Distribution: Debian, Ubuntu, Mythbuntu
Posts: 15

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by ondoho View Post
what does the drives data sheet say about this?

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?
 
Old 09-15-2018, 08:42 PM   #5
faginbagin
LQ Newbie
 
Registered: Nov 2007
Distribution: Debian, Ubuntu, Mythbuntu
Posts: 15

Original Poster
Rep: Reputation: 5
Quote:
Originally Posted by fatmac View Post
Might also be down to the bus speed.

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RAID10 write speed decreased to normal SSD speed after rebuilding the array. mke2k Linux - Server 2 07-11-2014 04:15 AM
I2C Single Read/Write Execution Speed. marcpolo Linux - General 3 11-02-2012 11:05 AM
Network write/read Speed meter mijohnst Linux - General 0 06-30-2007 08:57 PM
Internet speed is 50 times slower on Linux than on Windows callum85 Linux - Networking 2 10-05-2006 02:02 PM
DVD write/read speed check excel28 Linux - Hardware 4 12-08-2003 12:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration