I have 2 external USB hard drives encrypted with LUKS in Ubuntu 12.04. Generally, the both drives are very slow with LUKS/dmcrypt, e.g. 7 MB/s for both read/write, but I could live with this.
However, when I try to copy files from one encrypted disk to another one, it becomes unacceptable. Using rsync, the copy process freezes every several seconds for up to 20 seconds. When it freezes, rsync progress shows either nothing (just filename), or something like:
32768 1% 0.00kB/s 0:00:00
sometimes speed could be up to 100kB/s, but the number of bytes copied does not change. In very rare cases, the progress freezes with something like
72908800 27% 5.40MB/s 0:00:34
(and the numbers are not changing for several seconds).
It seems that this only happens when I copy from one LUKS drive to another. E.g., when I tried to copy a large file from one encrypted drive first to my home directory, and then from there to the other encrypted drive, there were no freezes (however, copy speed was constantly going down from initial ~20 MB/s to about 7 MB/s).
Any suggestions are welcome!
The problem with freezing progress was due to the fact, that both discs were mounted with 'async' option. Thus, when the buffer became full, progress was every time frozen while waiting until the buffer will become empty. After remounting with 'sync' option, the progress start reporting the real speed without any freezes (4-5 MB/sec):
This step only helps to fix the freezing progress. Since the write speed is not changed, only the buffer is disabled, the total file copy time stays the same.