DM-Crypt Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] md-raid5+lvm+dm-crypt+kvm: one streaming write	starves all reads
Date: Fri, 18 Sep 2009 23:09:19 +0200	[thread overview]
Message-ID: <20090918210919.GA27273@tansi.org> (raw)
In-Reply-To: <bb145bd20909180522j601c5e74u1b7552a0ca3accf3@mail.gmail.com>

On Fri, Sep 18, 2009 at 02:22:18PM +0200, Christian Pernegger wrote:
> > Yes. And that may be some s"synergetic" effect triggered by the
> > slowness. At least that is one possible explanation.
> 
> Agreed.
> 
> > You could try this with a dummy-cipher that does not take encryption time.
> >
> > I have not tried this myself, but hit candidates are
> > "ciper_null" and "ecb(ciper_null)". I have both (kernel
> > 2.6.30.5)
> 
> They're there all right, must have overlooked them. However I haven't
> managed to construct a cipher spec that'll work with cryptsetup. Maybe
> because it takes no key ...

Possibly. I do not know how to do this either. 

> Various tunings of the host's page cache (under /proc/sys/vm/) to make
> flushes less bursty didn't help much.

A pity. Have you tried to set dirty_writeback_centisecs to
something very low, e.g. 10? If I understand this correctly that
would cause regular flushes to start after 1 sec. 

> In the meantime I've set up a dedicated kvm guest for these tests,
> with one encrypted and one unencrypted scratch volume. Maybe some
> systematic benchmarking will point somewhere.

Good approach. You can also try different speed ciphers.
2fish should be faster than AES.

 > Seems a lot of people are having this problem, since ~2.6.24 at least,
> and it seems to get worse the slower the CPUs are, the faster the
> disks are. Chosing a faster cipher seems to help.

That would be consistent with a backlog before the cipher step
that eventually leads to an emergency flush. One possible solution 
would be to slow down writes before the buffer becomes full. However
I don't think there are provisions for that in the kernel. 

Arno


> Chris
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt
> 

-- 
Arno Wagner, Dr. sc. techn., Dipl. Inform., CISSP -- Email: arno@wagner.name 
GnuPG:  ID: 1E25338F  FP: 0C30 5782 9D93 F785 E79C  0296 797F 6B50 1E25 338F
----
Cuddly UI's are the manifestation of wishful thinking. -- Dylan Evans

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier 

  reply	other threads:[~2009-09-18 21:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 23:54 [dm-crypt] md-raid5+lvm+dm-crypt+kvm: one streaming write starves all reads Christian Pernegger
2009-09-16  8:11 ` Arno Wagner
2009-09-16 17:40   ` Christian Pernegger
     [not found]     ` <20090916215427.GA20647@tansi.org>
2009-09-17  0:36       ` Christian Pernegger
2009-09-17 11:12         ` Arno Wagner
2009-09-18 12:22           ` Christian Pernegger
2009-09-18 21:09             ` Arno Wagner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-18 21:21 Sven Eschenberg
2009-09-19  0:45 ` Arno Wagner
2009-09-19 11:45   ` Sven Eschenberg
2009-10-21 10:48     ` Christian Pernegger
2009-10-21 10:59       ` Rick Moritz
2009-10-21 15:05         ` Christian Pernegger
2009-10-21 15:08           ` Rick Moritz
2009-10-21 15:34             ` Michael Gebetsroither
2009-10-21 20:22               ` 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=20090918210919.GA27273@tansi.org \
    --to=arno@wagner.name \
    --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