#796976 partclone: Big slowdown after sector read error

Package:
partclone
Source:
partclone
Description:
Utility to clone and restore a partition
Submitter:
Per Westermark
Date:
2015-08-26 12:57:05 UTC
Severity:
important
#796976#5
Date:
2015-08-26 12:54:14 UTC
From:
To:
Dear Maintainer,

Program was started through Clonezilla with option to continue in case of read
errors, since the goal was to replace an old disk that had a few damaged
sectors.

The block size was 4096 while the source and target disks both had 512 byte
sectors.

   * What led up to the situation?

After a read error of an odd number of sectors from the source disk, the copy
process slowed down from above 100MB/s to about 10MB/s, and the "Current Block"
output always presented odd numbers.

Before the first read error, most of the time (70-80%) was in "wait", with a
few percent system time and a few percent user time.

After that read error, "wait" dropped to 0%, while system time climbed to about
85%.

Running atop, the source disk shows 95% busy, and about 200000 reads/second.
Average 0 kB/read (actually 512 byte/read). The destination disk shows 3% busy,
and about 200 writes/second. Average 512 kB/write.

So instead of just doing a few sector-sized (512-byte) transfers to properly
align and then return back to the normal block sizes for the transfer, the
program permanently switched to doing 512-byte reads.

4TB to copy at 100MB/s is about 12 hours.
But with the ten-fold slowdown, it becomes 120 hours.

   * What outcome did you expect instead?

I expected Partclone to be able to return back to 100MB/s or faster for the
rest of the copy - the rest of the partition did not contain any damaged
sectors. A few damaged sectors shouldn't bring the transfer to almost a stand-
still.