Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LZ1grbrSQoFU for ; Fri, 24 Feb 2012 00:10:44 +0100 (CET) Received: from v4.tansi.org (ns.km33513-03.keymachine.de [87.118.94.3]) by mail.saout.de (Postfix) with ESMTP for ; Fri, 24 Feb 2012 00:10:43 +0100 (CET) Received: from gatewagner.dyndns.org (84-74-163-71.dclient.hispeed.ch [84.74.163.71]) by v4.tansi.org (Postfix) with ESMTPA id 68F17204F90 for ; Fri, 24 Feb 2012 00:10:43 +0100 (CET) Date: Fri, 24 Feb 2012 00:10:43 +0100 From: Arno Wagner Message-ID: <20120223231042.GB28778@tansi.org> References: <20120223222300.GH22456@tracyreed.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120223222300.GH22456@tracyreed.org> Subject: Re: [dm-crypt] poor mysqldump performance List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: dm-crypt@saout.de I notice that you are using a really, really old kernel. 2.6.18 is from end of 2006 or so. There were some performance issues with the dm-layer, they might just still be in this old version. With 3.2.5 I basically see that IO is CPU limited or going at full speed if the CPU is fast enough. I have not tries a MySQL dump though, although this should just be standard disk accesses. Arno On Thu, Feb 23, 2012 at 02:23:00PM -0800, Tracy Reed wrote: > 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 > _______________________________________________ > dm-crypt mailing list > dm-crypt@saout.de > http://www.saout.de/mailman/listinfo/dm-crypt > -- Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name GnuPG: ID: 1E25338F FP: 0C30 5782 9D93 F785 E79C 0296 797F 6B50 1E25 338F ---- One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision. -- Bertrand Russell