From mboxrd@z Thu Jan 1 00:00:00 1970 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 BMnSVPVE7AfF for ; Fri, 7 Feb 2014 15:42:55 +0100 (CET) Received: from mail-ee0-x230.google.com (mail-ee0-x230.google.com [IPv6:2a00:1450:4013:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Fri, 7 Feb 2014 15:42:54 +0100 (CET) Received: by mail-ee0-f48.google.com with SMTP id t10so1555743eei.21 for ; Fri, 07 Feb 2014 06:42:53 -0800 (PST) Message-ID: <52F4F0EB.3060507@gmail.com> Date: Fri, 07 Feb 2014 15:42:51 +0100 From: Milan Broz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] dm-crypt perf related changes and cryptsetup LUKS format failing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Redwood Hyd , dm-crypt@saout.de On 02/07/2014 02:53 PM, Redwood Hyd wrote: > Hi All , > > I did an experimental kernel change in linux/drivers/md/dm-crypt.c for > improving crypto HW performance. > Here is brief of it > static void crypt_io_hints(struct dm_target *ti, > struct queue_limits *limits) > { > limits->physical_block_size = 32768; > blk_limits_io_min(limits, 32768); > blk_limits_io_opt(limits, 32768); > } > > It works (passed iozone -a, robocopy from samba client) and doubled > performance of dm-crypt WRITES ! Well, increasing encryption block size was discussed several times. Please search archive, e.g. here is some patch which increased block size: http://thread.gmane.org/gmane.linux.kernel.device-mapper.dm-crypt/6441/focus=6587 (yes, your patch is just modification of io limits, which is simpler but has some side effects - random io read/write will be worse I guess) > Problem - > After above change cryptsetup luks format started failing disk > validations so additionally in > Cryptsetup-1.1.3 I did following changes to pass disk validation: Why are you using version released 4 years ago? :) Try recent 1.6.3. It works without changes. (Btw your changes to cryptsetup are not correct, it will just paperback over real problem and cause LUKS format incompatibility.) Actually, this is what I see after you patch (x is activated LUKS device): # lsblk -t /dev/sdb NAME ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE RA WSAME sdb 0 512 0 512 512 1 cfq 128 128 32M `-x 0 32768 32768 32768 512 1 128 128 0B # lsblk -f /dev/sdb NAME FSTYPE LABEL UUID MOUNTPOINT sdb crypto_LUKS fc534366-6be5-46f3-9349-44dbe47f4b80 `-x ext4 6dfa13d0-2d0e-4955-a5c4-bd0848b07b47 /mnt/tst so IO limits works... Milan