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 OekJYMRbbOwE for ; Tue, 24 Jul 2012 17:19:50 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mail.saout.de (Postfix) with ESMTP for ; Tue, 24 Jul 2012 17:19:49 +0200 (CEST) Message-ID: <500EBCFE.1020208@redhat.com> Date: Tue, 24 Jul 2012 17:19:26 +0200 From: Milan Broz MIME-Version: 1.0 References: <20120722203929.GB3925@merlins.org> <20120722214757.GA16793@tansi.org> <20120723062850.GA6931@merlins.org> <20120723081407.GA872@tansi.org> <20120723161242.GB27727@merlins.org> <500D86AC.7090100@redhat.com> <20120723175129.GA15867@merlins.org> <500DC2B0.8060409@redhat.com> <20120724055722.GA15507@merlins.org> <20120724062518.GB1517@fancy-poultry.org> <20120724150247.GA14273@merlins.org> In-Reply-To: <20120724150247.GA14273@merlins.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [dm-crypt] aes-xts-plain with aes_x86_64 makes my SSD 5x slower than my encrypted HD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marc MERLIN Cc: dm-crypt@saout.de, Yves-Alexis Perez On 07/24/2012 05:02 PM, Marc MERLIN wrote: > On Tue, Jul 24, 2012 at 08:25:18AM +0200, Heinz Diehl wrote: >> Please correct me if I should be wrong, but your drive should report >> 512/4096 here, so it lies about the real blocksize it uses (4k). >> This raises the question if you have created your filesystem on top of >> the encrypted partition with e.g. "-b 4096". > > I'm using btrfs, which defaults to 4K blocks. Also, I was I seeing 270MB/s > reading a big file with btrfs on top of cryptroot. > > On Tue, Jul 24, 2012 at 10:44:36AM +0200, Milan Broz wrote: >> Seems I am running out of ideas :) >> (I just read the mails again and I think I am missing something >> obvious. Whatever, I will return to it later.) > > I wanted to command you for not giving up, you definitely went the extra > mile :) :) So seems elevator completely misbehaves for SSD in some situations. I have no time to check it today but this must be fixed. Read-ahead is just stupid workaround... # echo "0">/sys/block/sdc/queue/rotational # hdparm -t /dev/mapper/sdc_null_crypt Timing buffered disk reads: 220 MB in 3.01 seconds = 73.07 MB/sec # echo "1">/sys/block/sdc/queue/rotational # hdparm -t /dev/mapper/sdc_null_crypt Timing buffered disk reads: 652 MB in 3.01 seconds = 216.75 MB/sec This SSD is quicker if set to rotational mode! (So it merges requests in fact.) Milan