From: Mike Snitzer <snitzer@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Keith Busch <keith.busch@intel.com>,
jmoyer@redhat.com, shivakrishna.merla@netapp.com,
dm-devel@redhat.com, Bart Van Assche <bvanassche@acm.org>
Subject: awful request merge results while simulating high IOPS multipath
Date: Tue, 24 Feb 2015 19:56:08 -0500 [thread overview]
Message-ID: <20150225005608.GA13348@redhat.com> (raw)
In-Reply-To: <20150224183256.GA11566@redhat.com>
On Tue, Feb 24 2015 at 1:32pm -0500,
Mike Snitzer <snitzer@redhat.com> wrote:
> On Tue, Feb 24 2015 at 1:16pm -0500,
> Jens Axboe <axboe@kernel.dk> wrote:
> > >>
> > >>So all of this needs to be tested and performance vetted. But my
> > >>original suggestion was something like:
> > >>
> > >>if (run_queue && !md->queue->nr_pending)
> > >> blk_run_queue_async(md->queue);
> > >>
> > >>which might be a bit extreme, but if we hit 0, that's the only case
> > >>where you truly do need to run the queue. So that kind of logic
> > >>would give you the highest chance of merge success, potentially at
> > >>the cost of reduced performance for other cases.
> > >
> > >Yeah, I was wondering about not running the queue at all when discussing
> > >with Jeff earlier today. Seemed extreme, and Jeff thought it could
> > >cause performance to really take a hit.
> >
> > Whether you have to or not depends on how you break out of queueing
> > loops. But you definitely don't have to run it on every single
> > request completion...
>
> OK, thanks for clarifying.
>
> Will see how the initial RFC patch I shared works for Netapp's testcase
> but based on those results will work to arrive at a more
> generic/intelligent solution.
That initial RFC didn't do well. And given my results below, I'm not
holding out any hope for this io completion change, which we already
discussed as being more sane, having any impact:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=9068f2f15d5fc7a5c9dc6e6963913216ede0c745
Here is the sorry state of affairs:
Summary:
========
Request-based DM is somehow breaking the block layer's ability to properly merge requests.
Only good news is I seem to have a testbed that I can use to chase this issue down.
Test kernel is v4.0-rc1 with a few DM patches, see:
https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/log/?h=for-next
baseline:
=========
Writing to an STEC PCIe SSD using 64 threads, each using 4K sequentional IOs.
There are clearly merges happening.
fio job:
--------
[64_seq_write]
filename=/dev/skd0
rw=write
rwmixread=0
blocksize=4k
iodepth=16
direct=1
numjobs=64
#nrfiles=1
runtime=100
ioengine=libaio
time_based
deadline:
---------
Run status group 0 (all jobs):
WRITE: io=33356MB, aggrb=341513KB/s, minb=4082KB/s, maxb=5463KB/s, mint=100001msec, maxt=100014msec
Disk stats (read/write):
skd0: ios=0/638099, merge=0/7483318, ticks=0/8015451, in_queue=8073672, util=100.00%
cfq:
----
rotational=0
------------
Run status group 0 (all jobs):
WRITE: io=20970MB, aggrb=214663KB/s, minb=3202KB/s, maxb=3620KB/s, mint=100001msec, maxt=100030msec
Disk stats (read/write):
skd0: ios=47/390277, merge=0/4939075, ticks=0/7082618, in_queue=7109995, util=100.00%
rotational=1
------------
Run status group 0 (all jobs):
WRITE: io=30075MB, aggrb=307130KB/s, minb=2613KB/s, maxb=10247KB/s, mint=100001msec, maxt=100271msec
Disk stats (read/write):
skd0: ios=57/2217835, merge=0/5414906, ticks=0/6110715, in_queue=6120362, util=99.97%
multipath:
==========
Same workload as above, but this time through a request-based DM multipath target.
There are clearly _no_ merges happening.
echo "0 1563037696 multipath 0 0 1 1 service-time 0 1 2 /dev/skd0 1000 1" | dmsetup create skd_mpath
[64_seq_write]
#filename=/dev/mapper/skd_mpath
filename=/dev/dm-9
rw=write
rwmixread=0
blocksize=4k
iodepth=16
direct=1
numjobs=64
#nrfiles=1
runtime=100
ioengine=libaio
time_based
deadline:
---------
Run status group 0 (all jobs):
WRITE: io=22559MB, aggrb=230976KB/s, minb=3565KB/s, maxb=3659KB/s, mint=100001msec, maxt=100011msec
Disk stats (read/write):
dm-9: ios=71/5772755, merge=0/0, ticks=3/15309410, in_queue=15360084, util=100.00%, aggrios=164/5775057, aggrmerge=0/0, aggrticks=16/14960469, aggrin_queue=14956943, aggrutil=99.92%
skd0: ios=164/5775057, merge=0/0, ticks=16/14960469, in_queue=14956943, util=99.92%
cfq:
----
rotational=0
------------
Run status group 0 (all jobs):
WRITE: io=19477MB, aggrb=199424KB/s, minb=3001KB/s, maxb=3268KB/s, mint=100001msec, maxt=100010msec
Disk stats (read/write):
dm-9: ios=40/4811814, merge=0/159762, ticks=0/14866276, in_queue=14912510, util=100.00%, aggrios=224/4814462, aggrmerge=0/0, aggrticks=13/14399688, aggrin_queue=14396342, aggrutil=99.92%
skd0: ios=224/4814462, merge=0/0, ticks=13/14399688, in_queue=14396342, util=99.92%
rotational=1
------------
Run status group 0 (all jobs):
WRITE: io=21051MB, aggrb=215188KB/s, minb=2147KB/s, maxb=8671KB/s, mint=100001msec, maxt=100175msec
Disk stats (read/write):
dm-9: ios=59/1468500, merge=0/3836597, ticks=2/5928782, in_queue=5959348, util=100.00%, aggrios=152/1469016, aggrmerge=0/0, aggrticks=5/395471, aggrin_queue=395287, aggrutil=71.17%
skd0: ios=152/1469016, merge=0/0, ticks=5/395471, in_queue=395287, util=71.17%
next prev parent reply other threads:[~2015-02-25 0:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 16:44 [PATCH 0/4] dm: simplify request-based DM a bit and an RFC-like perf tweak Mike Snitzer
2015-02-24 16:44 ` [PATCH 1/4] dm: remove unnecessary wrapper around blk_lld_busy Mike Snitzer
2015-02-24 16:44 ` [PATCH 2/4] dm: remove request-based DM queue's lld_busy_fn hook Mike Snitzer
2015-02-24 16:44 ` [PATCH 3/4] dm: remove request-based logic from make_request_fn wrapper Mike Snitzer
2015-02-24 16:44 ` [RFC PATCH 4/4] dm: delay running the queue slightly during request completion Mike Snitzer
2015-02-24 16:51 ` Jens Axboe
2015-02-24 17:22 ` [RFC PATCH 4/4 v2] " Mike Snitzer
2015-02-24 17:52 ` Jens Axboe
2015-02-24 18:12 ` Mike Snitzer
2015-02-24 18:16 ` Jens Axboe
2015-02-24 18:32 ` Mike Snitzer
2015-02-25 0:56 ` Mike Snitzer [this message]
2015-02-25 4:14 ` awful request merge results while simulating high IOPS multipath Keith Busch
2015-02-25 15:11 ` Jens Axboe
2015-02-25 18:17 ` Busch, Keith
2015-02-25 22:10 ` Mike Snitzer
2015-02-25 23:57 ` Keith Busch
2015-02-26 0:11 ` Mike Snitzer
2015-02-26 0:28 ` Keith Busch
2015-02-25 4:38 ` FIXED! [was: awful request merge results while simulating high IOPS] multipath Mike Snitzer
2015-02-25 4:41 ` Mike Snitzer
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=20150225005608.GA13348@redhat.com \
--to=snitzer@redhat.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=dm-devel@redhat.com \
--cc=jmoyer@redhat.com \
--cc=keith.busch@intel.com \
--cc=shivakrishna.merla@netapp.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.