qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Dou Liyang <douly.fnst@cn.fujitsu.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	Fam Zheng <famz@redhat.com>,
	kwolf@redhat.com, armbru@redhat.com, mreitz@redhat.com,
	eblake@redhat.com, izumi.taku@jp.fujitsu.com,
	caoj.fnst@cn.fujitsu.com, fanc.fnst@cn.fujitsu.com,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC v2 0/4] block/qapi: refactor and optimize the qmp_query_blockstats()
Date: Wed, 21 Dec 2016 11:06:57 +0000	[thread overview]
Message-ID: <20161221110657.GD9482@stefanha-x1.localdomain> (raw)
In-Reply-To: <d6502c6d-616c-66dc-9c49-0fff7f1ee28c@cn.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 2565 bytes --]

On Wed, Dec 21, 2016 at 05:13:39PM +0800, Dou Liyang wrote:
> Hi Stefan,
> 
> At 12/20/2016 05:39 PM, Stefan Hajnoczi wrote:
> > On Tue, Dec 20, 2016 at 12:32:40AM +0800, Fam Zheng wrote:
> > > On Mon, 12/19 15:02, Stefan Hajnoczi wrote:
> > > > On Mon, Dec 19, 2016 at 04:51:22PM +0800, Dou Liyang wrote:
> > > > > These patches aim to refactor the qmp_query_blockstats() and
> > > > > improve the performance by reducing the running time of it.
> > > > > 
> > > > > qmp_query_blockstats() is used to monitor the blockstats, it
> > > > > querys all the graph_bdrv_states or monitor_block_backends.
> > > > > 
> > > > > There are the two jobs:
> > > > > 
> > > > > 1 For the performance:
> > > > > 
> > > > > 1.1 the time it takes(ns) in each time:
> > > > > the disk numbers     | 10    | 500
> > > > > -------------------------------------
> > > > > before these patches | 19429 | 667722
> > > > > after these patches  | 17516 | 557044
> > > > > 
> > > > > 1.2 the I/O performance is degraded(%) during the monitor:
> > > > > 
> > > > > the disk numbers     | 10    | 500
> > > > > -------------------------------------
> > > > > before these patches | 1.3   | 14.2
> > > > > after these patches  | 0.8   | 9.1
> > > > 
> > > > Do you know what is consuming the remaining 9.1%?
> > > > 
> > > > I'm surprised to see such a high performance impact caused by a QMP
> > > > command.
> > > 
> > > If it's "performance is 9.1% worse only during the 557044 ns when the QMP
> > > command is being processed", it's probably becaues the main loop is stalled a
> > > bit, and it's not a big problem. I'd be very surprised if the degradation is
> > > more longer than that.
> > 
> > It would be interesting to compare against virtio-blk dataplane.  That
> > way the QMP command can execute without interfering with disk I/O activity.
> > 
> > qemu-system-x86_64 ... \
> >     -object iothread,id=iothread0 \
> >     -drive if=none,id=drive0,file=vm.img,format=raw,aio=native,cache=none \
> >     -device virtio-blk-pci,drive=drive0,iothread=iothread0
> 
> Here is the result in the guest with 500 disks:
> 
> QMP command     | not execute | execute in each 0.5s |
> -------------------------------------------------------
> Average Times/s | 102.34675   | 103.128              |
> 
> the degradation is 0.76%, that can be ignored.
> 
> the dd command:
> dd if=date_1.dat of=date_2.dat conv=fsync oflag=direct bs=1k count=400k

Excellent.  It's good to know that dataplane is a solution to this
problem.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

  reply	other threads:[~2016-12-21 11:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-19  8:51 [Qemu-devel] [PATCH RFC v2 0/4] block/qapi: refactor and optimize the qmp_query_blockstats() Dou Liyang
2016-12-19  8:51 ` [Qemu-devel] [PATCH RFC v2 1/4] block: refactor bdrv_next_node for readability Dou Liyang
2016-12-19 14:19   ` Stefan Hajnoczi
2016-12-19  8:51 ` [Qemu-devel] [PATCH RFC v2 2/4] block/qapi: reduce the coupling between the bdrv_query_stats and bdrv_query_bds_stats Dou Liyang
2016-12-19  8:51 ` [Qemu-devel] [PATCH RFC v2 3/4] block/qapi: acquire a reference instead of a lock during querying blockstats Dou Liyang
2016-12-19 14:34   ` Stefan Hajnoczi
2016-12-19  8:51 ` [Qemu-devel] [PATCH RFC v2 4/4] block/qapi: optimize the query function of the blockstats Dou Liyang
2016-12-19 15:02 ` [Qemu-devel] [PATCH RFC v2 0/4] block/qapi: refactor and optimize the qmp_query_blockstats() Stefan Hajnoczi
2016-12-19 16:32   ` Fam Zheng
2016-12-20  9:39     ` Stefan Hajnoczi
2016-12-20  9:54       ` Dou Liyang
2016-12-20 10:01         ` Stefan Hajnoczi
2016-12-20 10:26           ` Dou Liyang
2016-12-20 11:09             ` Stefan Hajnoczi
2016-12-21  9:13       ` Dou Liyang
2016-12-21 11:06         ` Stefan Hajnoczi [this message]
2016-12-22 10:20           ` Dou Liyang
2016-12-20  9:47     ` Dou Liyang

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=20161221110657.GD9482@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=armbru@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=douly.fnst@cn.fujitsu.com \
    --cc=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=fanc.fnst@cn.fujitsu.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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).