linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Kralovic <Richard.Kralovic@dcs.fmph.uniba.sk>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Milan Broz <mbroz@redhat.com>,
	linux-kernel@vger.kernel.org,
	device-mapper development <dm-devel@redhat.com>,
	Greg Thelen <gthelen@google.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: CFQ and dm-crypt
Date: Tue, 26 Oct 2010 10:37:09 +0200	[thread overview]
Message-ID: <4CC69335.4090301@dcs.fmph.uniba.sk> (raw)
In-Reply-To: <20101025205934.GC23426@redhat.com>

On 10/25/10 22:59, Vivek Goyal wrote:
> Richard,
> 
> So what problem are you facing? I know you are referring to CFQ ioprio not
> working with dm targets but how does it impact you? So it is not about
> overall disk performance or any slow down with dm-crypt target but just
> about prioritizing your IO over other?

The ioprio not working is probably the biggest problem (since it is used
quite a lot for background tasks like desktop indexing services). But
also the overall performance is worse. I didn't do a rigorous
benchmarking, but tried a following simple test to see the impact of my
dm-crypt patch:

test-write:

SIZE=640


KERN=`uname -r`
((time /bin/bash -c "dd if=/dev/zero bs=1M count=64 \
   of=normal.tst oflag=direct") 1>$KERN-write-normal 2>&1) |
((time /bin/bash -c "ionice -c 3 dd if=/dev/zero bs=1M \
   count=64 of=idle.tst oflag=direct") 1>$KERN-write-idle 2>&1)

Times for vanilla kernel (with CFQ) were 5.24s for idle and 5.38s for
normal, times for patched kernel were 4.9s for idle and 3.13s for
normal. A similar test for reading showed even bigger differences:
vanilla kernel has 8.5s for idle as well as 8.5s for normal, patched
kernel has 4.2s for idle and 2.1s for normal.

So it seems that CFQ is behaving really badly if it is not able to see
which process is doing the IO (and sees kcryptd everywhere). As far as I
understood, there is no point in using CFQ in that case and it is much
better to use other scheduler in this situation.


	Richard

  reply	other threads:[~2010-10-26  8:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24 13:51 CFQ and dm-crypt Richard Kralovic
2010-10-24 16:15 ` Milan Broz
2010-10-25  9:53   ` Richard Kralovic
2010-10-25 11:09     ` Milan Broz
2010-10-25 14:22       ` Jeff Moyer
2010-10-25 20:59     ` Vivek Goyal
2010-10-26  8:37       ` Richard Kralovic [this message]
2010-10-26 10:57         ` Vivek Goyal
2010-11-03  3:23 ` Jeff Moyer
2010-11-03 15:54   ` Richard Kralovic
2010-11-04 21:07     ` Jeff Moyer
2010-11-16 16:44     ` Jeff Moyer
2010-11-21 20:16       ` Richard Kralovic
2010-11-22 14:20         ` Jeff Moyer
2010-11-22 21:01           ` Richard Kralovic

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=4CC69335.4090301@dcs.fmph.uniba.sk \
    --to=richard.kralovic@dcs.fmph.uniba.sk \
    --cc=dm-devel@redhat.com \
    --cc=gthelen@google.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbroz@redhat.com \
    --cc=vgoyal@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).