Machine IO slowing over time
Bob Proulx
bob at proulx.com
Tue Feb 3 22:43:04 UTC 2026
Grant Johnson wrote:
> What else should I be checking?
Sometimes reading data from drives will start to take longer when the
data on the drives is very static over years. In those cases the data
might degrade where more error correction from the drive is needed to
read the data. And the drive might have to retry reading those disk
sectors more times to get a good read.
This can be "fluffed" by reading and writing the entire drive. I have
seen some drives have dramatic improvement. I have seen other drives
have no change at all.
The most direct way is to boot a live boot image so that nothing is
touching the disk and then read and write the entire disk in place.
time dd if=/dev/sdX of=/dev/sdX bs=1M iflag=fullblock oflag=sync,direct
Of course doing so can take a long time on a big drive. I like to see
progress. The utility I like the best for this is "pv" pipe-viewer.
If you have a new enough utility then it will have the --direct-io
option. But if not then use dd.
time pv /dev/sdX | dd of=/dev/sdX bs=1M iflag=fullblock oflag=sync,direct
The pv utility can even be used as the reader and writer itself when
using the --direct-io option. But no control of block size so dd is
still useful.
Since the data being written is the data being read this is safe but
only if nothing else is touching the drive at the same time.
Bob
More information about the NCLUG
mailing list