DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Slow I/O with LUKS on amd64
Date: Wed, 09 Mar 2011 16:46:32 +0100	[thread overview]
Message-ID: <4D77A0D8.30806@redhat.com> (raw)
In-Reply-To: <20110309153836.03e21299@hikaru.localdomain>

On 03/09/2011 03:38 PM, Carlo Wood wrote:
> On Wed, 09 Mar 2011 11:21:53 +0100
> Milan Broz <mbroz@redhat.com> wrote:
> 
> Actually, I have been trying to use dmcrypt for my swap
> (anything that is swapped HAS to be encrypted, of course,
> because it can be anything).
> 
> However, while the disk benchmarked gives me the normal
> 50 MB/s for that disk/partition, reading/writing the swap
> with encryption only gives me around 1 MB/s. This was
> so unacceptable that I turned off swap all together:
> I rather crash when running out of memory than having to
> wait minutes every moment of the day (and for some reason
> linux likes to use the swap a lot, even while normally
> it is not running out of memory).
> 
> I have an Intel Core 2(tm) cpu (a Quad Core Extreme QX6700),
> but also x86_64; stock debian kernel.

It could be another problem with swap. I remeber such
reports some time ago, maybe it is back.

Anyway, I am using Debian on x86_64 as well (but with recompiled
upstream kernel) - all above ext3/ext4/LVM over dmcrypt
for my stable machine and see no such problems.

How did you test swap device access?
If you can reproduce it, please provide more info.

See for example this my system (Debian testing, except upstream kernel,
dmcrypt uses AES-NI), just plain dd from swap volume over LUKS:

# echo 3 > /proc/sys/vm/drop_caches

# dd if=/dev/notebook/swap of=/dev/null bs=4k
1024000+0 records in
1024000+0 records out
4194304000 bytes (4.2 GB) copied, 42.0784 s, 99.7 MB/s

# lsblk /dev/sda2
NAME                       MAJ:MIN RM   SIZE RO MOUNTPOINT TYPE
sda2                         8:2    0  87.8G  0            part
└─sda2_crypt (dm-0)        253:0    0  87.8G  0            CRYPT
  ├─notebook-data (dm-1)   253:1    0  68.3G  0 /home      LVM
  ├─notebook-swap (dm-2)   253:2    0   3.9G  0 [SWAP]     LVM
  └─notebook-root64 (dm-3) 253:3    0  15.6G  0 /          LVM

(lsblk is from new util-linux, I am just testing some new things here)

Milan

  reply	other threads:[~2011-03-09 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09  8:11 [dm-crypt] Slow I/O with LUKS on amd64 Thomas Damgaard
2011-03-09 10:21 ` Milan Broz
2011-03-09 14:38   ` Carlo Wood
2011-03-09 15:46     ` Milan Broz [this message]
     [not found]       ` <AANLkTinTsUxYz1_ANqnsqjVejAM39oi7eC=2nqwiyjcn@mail.gmail.com>
     [not found]         ` <4D77BB5B.8090007@redhat.com>
2011-03-10 13:36           ` Thomas Damgaard
  -- strict thread matches above, loose matches on Subject: below --
2011-03-15  0:44 Hanno Foest

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D77A0D8.30806@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox