All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: Corrado Zoccolo <czoccolo@gmail.com>,
	Jens Axboe <jens.axboe@oracle.com>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Shaohua Li <shaohua.li@intel.com>,
	Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Subject: Re: [PATCH] cfq-iosched: non-rot devices do not need read queue merging
Date: Tue, 5 Jan 2010 10:13:53 -0500	[thread overview]
Message-ID: <20100105151353.GA4631@redhat.com> (raw)
In-Reply-To: <x49zl4s8uoj.fsf@segfault.boston.devel.redhat.com>

On Tue, Jan 05, 2010 at 09:58:52AM -0500, Jeff Moyer wrote:
> Corrado Zoccolo <czoccolo@gmail.com> writes:
> 
> > On Mon, Jan 4, 2010 at 8:04 PM, Jeff Moyer <jmoyer@redhat.com> wrote:
> >> Vivek Goyal <vgoyal@redhat.com> writes:
> >>>> >>> Hi Corrado,
> >>>> >>>
> >>>> >>> What's the reason that reads don't benefit from merging queues and hence
> >>>> >>> merging requests and only writes do on SSD?
> >>>> >>
> >>>> >> On SSDs, reads are just limited by the maximum transfer rate, and
> >>>> >> larger (i.e. merged) reads will just take proportionally longer.
> >>>> >
> >>>> > This is simply not true.  You can get more bandwidth from an SSD (I just
> >>>> > checked numbers for 2 vendors' devices) by issuing larger read requests,
> >>>> > no matter whether the access pattern is sequential or random.
> >>>> I know, but the performance increase given the size is sublinear, and
> >>>> the situation here is slightly different.
> >>>> In order for the requests to be merged, they have to be submitted concurrently.
> >>>> So you have to compare 2 concurrent requests of size x with one
> >>>> request of size 2*x (with some CPU overhead).
> >>>> Moreover, you always pay the CPU overhead, even if you can't do the
> >>>> merging, and you must be very lucky to keep merging, because it means
> >>>> the two processes are working in lockstep; it is not sufficient that
> >>>> the requests are just nearby, as for rotational disks.
> >>>>
> >>>
> >>> For jeff, at least "dump" utility threads were kind of working in lockstep
> >>> for writes and he gained significantly by merging these queues together.
> >>
> >> Actually, it was for reads.
> >>
> >>> So the argument is that CPU overhead saving in this case is more substantial
> >>> as compared to gains made by lockstep read threads. I think we shall have to
> >>> have some numbers to justify that.
> >>
> >> Agreed.  Corrado, I know you don't have the hardware, so I'll give this
> >> a run through the read-test2 program and see if it regresses at all.
> > Great.
> 
> I ran the test program 50 times, and here are the results:
> 
> ==> vanilla <==
> Mean: 163.22728
> Population Std. Dev.: 0.55401
> 
> ==> patched <==
> Mean: 162.91558
> Population Std. Dev.: 1.08612
> 
> This looks acceptable to me.

Thanks Jeff, one thing comes to mind. Now with recent changes, we drive deeper
depths on SSD with NCQ and there are not many pending cfqq on service tree
until and unless number of parallel threads exceed NCQ depth (32). If
that's the case, then I think we might not be seeing lot of queue merging
happening in this test case until and unless dump utility is creating more
than 32 threads.

If time permits, it might also be interesting to run the same test with queue
depth 1 and see if SSDs without NCQ will suffer or not.

Thanks
Vivek

  reply	other threads:[~2010-01-05 15:14 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30 12:10 [PATCH] cfq-iosched: non-rot devices do not need queue merging Corrado Zoccolo
2009-12-30 18:45 ` Jens Axboe
2009-12-30 20:31   ` Corrado Zoccolo
2009-12-30 21:11     ` Jens Axboe
2009-12-30 21:21       ` Corrado Zoccolo
2009-12-30 21:34         ` Jens Axboe
2009-12-30 22:22           ` [PATCH] cfq-iosched: non-rot devices do not need read " Corrado Zoccolo
2010-01-04 14:47             ` Vivek Goyal
2010-01-04 16:36               ` Corrado Zoccolo
2010-01-04 16:51                 ` Jeff Moyer
2010-01-04 18:32                   ` Vivek Goyal
2010-01-04 18:37                   ` Corrado Zoccolo
2010-01-04 18:51                     ` Vivek Goyal
2010-01-04 19:04                       ` Jeff Moyer
2010-01-04 20:37                         ` Corrado Zoccolo
2010-01-05 14:58                           ` Jeff Moyer
2010-01-05 15:13                             ` Vivek Goyal [this message]
2010-01-05 21:19                               ` Jeff Moyer
2010-01-05 21:48                                 ` Corrado Zoccolo
2010-01-07 10:56                                   ` Kirill Afonshin
2010-01-07 13:38                                     ` Corrado Zoccolo
2010-01-07 14:36                                       ` Vivek Goyal
2010-01-07 17:00                                         ` Corrado Zoccolo
2010-01-07 18:37                                           ` Vivek Goyal
2010-01-07 20:16                                             ` Corrado Zoccolo
2010-01-08 18:53                                               ` Vivek Goyal
2010-01-10 12:55                                   ` Corrado Zoccolo
2010-01-10 21:04             ` [PATCH] cfq-iosched: NCQ SSDs " Corrado Zoccolo
2010-01-10 21:08               ` Corrado Zoccolo
2010-01-11 11:25               ` Jeff Garzik
2010-01-11 12:26                 ` Corrado Zoccolo
2010-01-11 13:13                   ` Jens Axboe
2010-01-11 13:18                     ` Jeff Garzik
2010-01-11 13:24                       ` Jens Axboe
2010-01-11 14:53                       ` Corrado Zoccolo
2010-01-11 16:44                         ` Vivek Goyal
2010-01-11 17:00                           ` Corrado Zoccolo
2010-01-11 17:07                             ` Vivek Goyal
2010-01-11 19:05                               ` Corrado Zoccolo
2010-01-11 17:11                             ` Vivek Goyal
2010-01-11 19:09                               ` Corrado Zoccolo

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=20100105151353.GA4631@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=czoccolo@gmail.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=jens.axboe@oracle.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.