dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Yakov Hrebtov <hrebtov@gmail.com>
To: dm-devel@redhat.com
Subject: dm_crypt: very low performance of random IO operations
Date: Fri, 03 Sep 2010 14:28:41 +0600	[thread overview]
Message-ID: <4C80B1B9.6040809@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1721 bytes --]

I'm experirncing problems with performance of random IO operations of 
dm_crypt-encrypted devices.
Sequential IO is good (using AES-NI gives almost no difference comparing with 
unencrypted device), but random IO is poor comparing with unencrypted devices.

For benchmarking i've used simple utility, that reading small pieces of data 
from a raw disk device, in a random access pattern. The utility measures the 
number of seeks per second (reading operations per second), the device can do.

The source code of utility is attached. Also avalilable via link 
http://www.linuxinsight.com/files/seeker.c

I've tested 2 RAID arrays:
1. RAID 10 of 4 x Intel X25-E SSD drives (/dev/sdb)
2. RAID 10 of 8 x Seagate Savvio 15K 2.5" SAS drives (/dv/sdc)

Both arrays is handled by Adaptec 5805Z RAID card.

I've created encrypted mappings with:
cryptsetup --cipher=aes-cbc-essiv:sha256 --key-size=256 create cfs1 /dev/sdb
cryptsetup --cipher=aes-cbc-essiv:sha256 --key-size=256 create cfs2 /dev/sdc

Testing results:
1. SSD array:
    /dev/sdb: 3320 seeks/second
    /dev/mapper/cfs1: 99 seeks/second
2. SAS array:
    /dev/sdc: 257 seeks/second
    /dev/mapper/cfs2: 85 seeks/second

As you see the difference between clear and encrypted devices is huge, 
especially in SSD case.

The current behavior makes almost impossible to use encrypted devices to handle 
databases. You know, the typical database workload is random IO operations.

These tests done using kernel:
2.6.32-24-server #39-Ubuntu SMP x86_64 GNU/Linux

Some months before i've investigated also other kernels and distributions. The 
behavior is very similar.
If you need any additional info, a can provide it.

What do you think about this issue?

Thank you.



[-- Attachment #2: seeker.c --]
[-- Type: image/x-xbitmap, Size: 1580 bytes --]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



             reply	other threads:[~2010-09-03  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-03  8:28 Yakov Hrebtov [this message]
2010-09-07 20:06 ` dm_crypt: very low performance of random IO operations Milan Broz

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=4C80B1B9.6040809@gmail.com \
    --to=hrebtov@gmail.com \
    --cc=dm-devel@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).