public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Chmielewski <mangoo@wpkg.org>
To: linux-kernel@vger.kernel.org
Cc: pernegger@gmail.com, arjan@infradead.org
Subject: Re: *Really* bad I/O latency with md raid5+dm-crypt+lvm
Date: Mon, 12 Oct 2009 16:48:18 +0200	[thread overview]
Message-ID: <4AD341B2.6000704@wpkg.org> (raw)

> Summary: I was hoping to use a layered storage setup, namely lvm on
> dm-crypt on md raid5 for a new box I'm setting up, but that isn't
> looking so good since a single heavyish writer will monopolise any and
> all I/O on the "device". F. ex. while cp'ing a few GB of data from an
> external disk to the array it takes ~10sec to run ls and ~2min to
> start aptitude. Clueless attempts at a diagnosis below.

Did you try running strace to see where ls pauses?

Did you try running latencytop (and generally, top/htop while doing your 
tests)?


(...)

> Anyway, as soon as I copy something to the array or create a larger
> (upwards of a few hundred MiB) tar archive the box becomes utterly
> unresponsive until that job is finished. Even on the local console the
> completion time for a simple ls or cat is of the order of tens of
> seconds, just forget about launching emacs.
> Now I know that people have been ranting about desktop responsiveness
> for a while but that was very much an abstract thing for me until now.

I think the above (big latency when doing some bigger IO) is a general 
Linux problem.

I see similar behaviour on quite powerful hardware, i.e. Core i7, 8 GB 
RAM, 2x HDD in a software RAID-1 array (no dm-crypt), when tarring 
something big, or writing dd if=/dev/zero of=/home/me/bigfile - doing ls 
in another terminal or just starting top can take up to a minute.

Quite interestingly, background RAID synchronization have almost no 
effect on latency.

(...)


> According to openssl speed aes-256-cbc the CPUs encryption speed is
> ~113 MiB/s (single core, est. for 512b blocks). Obviously the array is
> much faster than that. I can't find the benchmarks ATM but the numbers
> seemed plausible for 70 MiB/s (optimistic est. for sequential access)
> disks at the time.

You can find some dm-crypt benchmarks i.e. here:

http://blog.wpkg.org/2009/04/23/cipher-benchmark-for-dm-crypt-luks/

Obviously, they will not match your hardware.

Also note that dm-crypt is not "SMP-ready", so whatever hardware you 
have, it will only use once CPU - this may seriously limit the 
performance, depending on your usage and hardware.


-- 
Tomasz Chmielewski



             reply	other threads:[~2009-10-12 14:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12 14:48 Tomasz Chmielewski [this message]
2009-10-12 17:37 ` *Really* bad I/O latency with md raid5+dm-crypt+lvm Mike Galbraith
  -- strict thread matches above, loose matches on Subject: below --
2009-10-12 14:01 Christian Pernegger
2009-10-12 14:26 ` Arjan van de Ven
2009-10-12 19:05   ` Christian Pernegger

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=4AD341B2.6000704@wpkg.org \
    --to=mangoo@wpkg.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pernegger@gmail.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