[dm-crypt] LUKS/ dm-crypt/ ext4 appears to be single threaded

Milan Broz mbroz at redhat.com
Wed Mar 28 23:33:54 CEST 2012


On 03/23/2012 05:11 AM, David Christensen wrote:
> I have a 1.5 TB SATA hard drive I use for back-up's.  It has a single
> large partition encrypted with LUKS/ dm-crypt and formatted with ext4.
> I've noticed what appears to be single-threaded behavior when one
> process is performing a long-lived write to the disk (notably 'ssh
> user at host tar ...>  backupfile.tar.gz') and another process attempts to
> access the disk (either read or write).  This is tolerable for a back-up
> application, but would not be acceptable for multi-user, multi-process,
> and/or multi-threaded applications (file server, terminal server, web
> server, etc.).

You forgot to mention kernel version, it changed in various versions.

For recent kernel 3.x, if multiple processes access the encrypted disk,
it tries to keep submitted work on cpu which submitted it (so it run in parallel).

There are some patches to change parallel operations to another model
in dmcrypt, if you want to experiment, see
http://people.redhat.com/mpatocka/patches/kernel/dm-crypt-paralelizace/current/

I have several performance tests, and some of these patches perhaps
appear in 3.5 kernel but it need still more work.

Milan


More information about the dm-crypt mailing list