[dm-crypt] unusual writing speeds when benchmark speeds are high enough

.. ink .. mhogomchungu at gmail.com
Mon Mar 18 08:58:31 CET 2013

On Mon, Mar 18, 2013 at 2:22 AM, Milan Broz <gmazyland at gmail.com> wrote:

> Please note that "benchmark" test is just appoximate.
> If there is a problem with IO (storage - alignment etc)
> always try to test with empty cipher - just use
> -c null in luksFormat
> (NOTE: this is plain copy, NO ENCRYPTION)
> Available since http://code.google.com/p/**cryptsetup/wiki/Cryptsetup143<http://code.google.com/p/cryptsetup/wiki/Cryptsetup143>
> This way you can check if the problem is in dmcrypt
> overhead or some storage misconfiguration (data alignment etc).
> (-c null will cause no kernel crypto is used at all, it is
> plain data copy, just using the same dmcrypt IO path).
> Also try direct io (add oflag=direct to dd) etc.
> (This will eliminate page cache effect.)
> In any case, try underlying device directly, then add another
> layer, one per every step (LUKS, LVM, RAID, ...) so you can see where
> is the problem. (See lsblk how the storage stack looks like.)
below is his new output with "null" cipher and "dd" using "oflag" option.It
looks like the problem in his system is in the crypto stuff since the speed
he is getting with "null" cipher is far greater than the speed he gets with
the default cipher.

[18.03.2013 08:49 Uhr]
[root at sheep 16] ~ > dd if=/dev/zero of=test.img  bs=80M count=1 oflag=direct
1+0 Datensätze ein
1+0 Datensätze aus
83886080 Bytes (84 MB) kopiert, 2,08489 s, 40,2 MB/s

[18.03.2013 08:50 Uhr]
[root at sheep 17] ~ > cryptsetup create -c null test test.img
Passsatz eingeben:

[18.03.2013 08:50 Uhr]
[root at sheep 18] ~ > dd if=/dev/zero of=/dev/mapper/test  bs=10M count=1
1+0 Datensätze ein
1+0 Datensätze aus
10485760 Bytes (10 MB) kopiert, 0,108011 s, 97,1 MB/s

[18.03.2013 08:50 Uhr]
[root at sheep 19] ~ > cryptsetup remove test
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20130318/39fb0f2b/attachment.html>

More information about the dm-crypt mailing list