All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] poor mysqldump performance
@ 2012-02-23 22:23 Tracy Reed
  2012-02-23 23:10 ` Arno Wagner
  2012-02-24  1:29 ` Alasdair G Kergon
  0 siblings, 2 replies; 10+ messages in thread
From: Tracy Reed @ 2012-02-23 22:23 UTC (permalink / raw)
  To: dm-crypt

I am using dmcrypt/LUKS on:

CentOS 5.5
kernel 2.6.18-194.32.1.el5
MySQL 5.5.12
cryptsetup-luks 1.0.3
ext3

Doing a mysqldump from the LUKS/dmcrypt volume takes twice as long as it does
from a non-encrypted volume. Only a few percent of the CPU are taken for the
encryption so it isn't kcryptd maxing out the CPU. Most interestingly I notice
that iowait goes from 90% for the non-encrypted db to 99% for the encrypted db.
It really looks like a lot more IO is somehow generated.

This makes no sense to me as I understand dmcrypt to sit above the disk layer
and do a block-for-block encrypt/decrypt of the data as it passes through. How
could it possibly cause extra disk IO? At first I thought maybe it was disk
alignment (which has bitten me many times before) but we are doing reads here,
not writes. iostat confirms that during the mysqldump practically no writes are
happening. I've also looked at increasing readahead to no effect.

I've googled and found that as long as dmcrypt isn't maxing out the CPU (for
which latest kernels support AES-NI and multi-threaded kcryptd) the performance
with and without encryption should be pretty much the same. I don't understand
why my reads are taking such a hit.

Any ideas?

-- 
Tracy Reed

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-02-25  2:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-23 22:23 [dm-crypt] poor mysqldump performance Tracy Reed
2012-02-23 23:10 ` Arno Wagner
2012-02-23 23:59   ` Tracy Reed
2012-02-24  8:18     ` Milan Broz
2012-02-24 19:07       ` Tracy Reed
2012-02-24 20:05         ` Arno Wagner
2012-02-24 22:30           ` Tracy Reed
2012-02-25  2:13             ` Arno Wagner
2012-02-24  1:29 ` Alasdair G Kergon
2012-02-24  2:55   ` Tracy Reed

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.