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 L02BYurCypUu for ; Tue, 24 Jul 2012 15:54:24 +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 15:54:23 +0200 (CEST) Message-ID: <500EA8FE.3010303@redhat.com> Date: Tue, 24 Jul 2012 15:54:06 +0200 From: Milan Broz MIME-Version: 1.0 References: <20120722190757.GB10089@merlins.org> <1342986452.26887.3.camel@scapa> <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> In-Reply-To: <20120724055722.GA15507@merlins.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 07:57 AM, Marc MERLIN wrote: > Mmmh, so I installed "standard" linux-image-3.2.0-3-amd64 from debian. > And.... > nothing changed :( Well. I found SSD where I can reproduce something similar. Seems page cache messes something with readahead... # lsblk /dev/sdc -t NAME ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED RQ-SIZE sdc 0 512 0 512 512 0 noop 128 └─sdc_null_crypt (dm-0) 0 512 0 512 512 0 128 - Disable readahead # blockdev --setra 0 /dev/mapper/sdc_null_crypt # hdparm -t /dev/mapper/sdc_null_crypt Timing buffered disk reads: 106 MB in 3.01 seconds = 35.18 MB/sec (pretty bad) But with direct-io it still works: # hdparm --direct -t /dev/mapper/sdc_null_crypt Timing O_DIRECT disk reads: 698 MB in 3.00 seconds = 232.44 MB/sec (now with read-ahead set to 4M) # blockdev --setra 8192 /dev/mapper/sdc_null_crypt # hdparm -t /dev/mapper/sdc_null_crypt Timing buffered disk reads: 664 MB in 3.00 seconds = 221.29 MB/sec So. Can you please try to increase readahead (and also run it with direct-io)? Just to check if it is the same problem or not... Thanks, Milan