Tuesday 30 October 2018

linux - 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?

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...