linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk
@ 2014-06-13 17:29 Ming Lei
  2014-06-13 17:29 ` [RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ Ming Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Ming Lei @ 2014-06-13 17:29 UTC (permalink / raw)
  To: Jens Axboe, linux-kernel
  Cc: Michael S. Tsirkin, linux-api, virtualization, Stefan Hajnoczi,
	Paolo Bonzini

Hi,

This patches try to support multi virtual queues(multi-vq) in one
virtio-blk device, and maps each virtual queue(vq) to blk-mq's
hardware queue.

With this approach, both scalability and performance problems on
virtio-blk device get improved.

For verifying the improvement, I implements virtio-blk multi-vq over
qemu's dataplane feature, and both handling host notification
from each vq and processing host I/O are still kept in the per-device
iothread context, the changes are based on qemu v2.0.0 release, and
can be accessed from below tree:

	git://kernel.ubuntu.com/ming/qemu.git #v2.0.0-virtblk-dataplane-mq

For enabling the multi-vq feature, 'num_queues=N' need to be added into
'-device virtio-blk-pci ...' of qemu command line, and suggest to pass
'vectors=N+1' to keep one MSI irq vector per each vq, and the feature
depends on x-data-plane.

Fio(libaio, randread, iodepth=64, bs=4K, jobs=N) is run inside VM to
verify the improvement.

I just create a small quadcore VM and run fio inside the VM, and
num_queues of the virtio-blk device is set as 2, but looks the
improvement is still obvious.

1), about scalability
- without mutli-vq feature
	-- jobs=2, thoughput: 145K iops
	-- jobs=4, thoughput: 100K iops
- without mutli-vq feature
	-- jobs=2, thoughput: 186K iops
	-- jobs=4, thoughput: 199K iops

2), about thoughput
- without mutli-vq feature
	-- top thoughput: 145K iops
- with mutli-vq feature
    -- top thoughput: 199K iops

So even for one quadcore VM, if the virtqueue number is increased
from 1 to 2, both scalability and performance can get improved a
lot.

Thanks,
--
Ming Lei

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-12-15  1:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 17:29 [RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk Ming Lei
2014-06-13 17:29 ` [RFC PATCH 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ Ming Lei
     [not found]   ` <1402680562-8328-2-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-06-16 12:42     ` Rusty Russell
2014-06-13 17:29 ` [RFC PATCH 2/2] block: virtio-blk: support multi virt queues per virtio-blk device Ming Lei
     [not found]   ` <1402680562-8328-3-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-06-16 12:47     ` Rusty Russell
2014-06-17  2:40   ` Stefan Hajnoczi
     [not found]     ` <CAJSP0QWaS--gPZ=ONFrXby1DQLw4R0RCro7bpHCdmucyjmqT_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-17 15:50       ` Ming Lei
2014-06-17 15:53         ` Paolo Bonzini
2014-06-17 16:00           ` Ming Lei
2014-06-17 16:34             ` Paolo Bonzini
     [not found]               ` <53A06E05.9060708-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-18  4:04                 ` Ming Lei
     [not found]                   ` <CACVXFVMkV5R5GUjM7Y-U54SA-ENZZ26dbbv4K2_OYPdmmiuUqg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-14 10:31                     ` Paolo Bonzini
     [not found]                       ` <566E9A7E.3030203-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-12-15  1:26                         ` Ming Lei
2014-06-13 17:35 ` [RFC PATCH 0/2] block: virtio-blk: support multi vq per virtio-blk Jens Axboe

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).