From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Kevin Wolf <kwolf@redhat.com>,
zhunxun@gmail.com, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] virtio: disable notifications in blk and scsi
Date: Thu, 17 Nov 2016 13:27:49 +0000 [thread overview]
Message-ID: <20161117132749.GI24138@stefanha-x1.localdomain> (raw)
In-Reply-To: <20161117001658-mutt-send-email-mst@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1532 bytes --]
On Thu, Nov 17, 2016 at 12:17:57AM +0200, Michael S. Tsirkin wrote:
> On Wed, Nov 16, 2016 at 09:53:06PM +0000, Stefan Hajnoczi wrote:
> > Disabling notifications during virtqueue processing reduces the number of
> > exits. The virtio-net device already uses virtio_queue_set_notifications() but
> > virtio-blk and virtio-scsi do not.
> >
> > The following benchmark shows a 15% reduction in virtio-blk-pci MMIO exits:
> >
> > (host)$ qemu-system-x86_64 \
> > -enable-kvm -m 1024 -cpu host \
> > -drive if=virtio,id=drive0,file=f24.img,format=raw,\
> > cache=none,aio=native
> > (guest)$ fio # jobs=4, iodepth=8, direct=1, randread
> > (host)$ sudo perf record -a -e kvm:kvm_fast_mmio
> >
> > Number of kvm_fast_mmio events:
> > Unpatched: 685k
> > Patched: 592k (-15%, lower is better)
>
> Any chance to see a gain in actual benchmark numbers?
> This is important to make sure we are not just
> shifting overhead around.
Good idea. I reran this morning without any tracing and compared
against bare metal.
Total reads for a 30-second 4 KB random read benchmark with 4 processes
x iodepth=8:
Bare metal: 26440 MB
Unpatched: 19799 MB
Patched: 21252 MB
Patched vs Unpatched: +7% improvement
Patched vs Bare metal: 20% virtualization overhead
The disk image is a 8 GB raw file on XFS on LVM on dm-crypt on a Samsung
MZNLN256HCHP 256 GB SATA SSD. This is just my laptop.
Seems like a worthwhile improvement to me.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2016-11-17 13:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 21:53 [Qemu-devel] [PATCH 0/3] virtio: disable notifications in blk and scsi Stefan Hajnoczi
2016-11-16 21:53 ` [Qemu-devel] [PATCH 1/3] virtio: add missing vdev->broken check Stefan Hajnoczi
2016-11-17 8:31 ` Cornelia Huck
2016-11-17 10:58 ` Stefan Hajnoczi
2016-11-17 12:24 ` Cornelia Huck
2016-11-18 10:55 ` Stefan Hajnoczi
2016-11-16 21:53 ` [Qemu-devel] [PATCH 2/3] virtio-blk: suppress virtqueue kick during processing Stefan Hajnoczi
2016-11-16 21:53 ` [Qemu-devel] [PATCH 3/3] virtio-scsi: " Stefan Hajnoczi
2016-11-16 22:17 ` [Qemu-devel] [PATCH 0/3] virtio: disable notifications in blk and scsi Michael S. Tsirkin
2016-11-17 13:27 ` Stefan Hajnoczi [this message]
2016-11-17 17:38 ` Michael S. Tsirkin
2016-11-18 10:58 ` Stefan Hajnoczi
2016-11-18 14:21 ` Michael S. Tsirkin
2016-11-18 15:20 ` Stefan Hajnoczi
2017-01-04 13:51 ` Stefan Hajnoczi
2016-11-17 11:01 ` Christian Borntraeger
2016-11-18 11:02 ` Stefan Hajnoczi
2016-11-18 11:36 ` Christian Borntraeger
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=20161117132749.GI24138@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=zhunxun@gmail.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).