Why is a failing hard disk slow?

From my currently failing hard drive, I know that I'm erasing it with a write speed of around 300kB/s cause of at least of few bad sectors

I'm curious about what exactly causes this slow write speed? For example, given the linux programm dd to write to a disk one usually gets at least 75MB/s assuming a 4kB sector size would result that one 4kB sector gets written in around 0.05 milliseconds (if my calc is corrent ^^). If I write with 300kB/s to a failing disk it means that 4kB is done in about 13 milliseconds.

So given a well written userspace application able to write with 75MB/s what causes a drop to 300kB/s? I don't assume that the linux kernel has some kind of "sleep" or such high retry attempt that it takes so much longer to notice a failed write? Or does the disk itself slow everything down? If yes, why? I would assume that the physical disk knows immediately if the data could have been written or not? Why does a failing disk get slow?


Solution 1:

If it's physical damage, the hard drive might be struggling to work properly (e.g. needs to retry many times to do a write, is trying its hardest to read from a damaged sector etc...) and thus has to slow down.

Solution 2:

If it is failing down, or in other words it has been damaged someway, it is normal that its performances aren't at 100%. We are talking about hardware phisycal damage, not software related problems.
If your car has its engine damaged, will you be surprised to find it not going at its full speed?

If it has some bad sectors they are hardly (or not at all) read/written by the system, that consequently can hang.
I once had a similar problem, and the drive had some damaged sectors, the SMART report showed that it has several spin retries. The consequence was that the whole system was operating very slowly because it kept trying to access corrupted data.