All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
To: Ming Lei <ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	"Michael S. Tsirkin"
	<mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Stefan Hajnoczi
	<stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Paolo Bonzini <pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v2 0/2] block: virtio-blk: support multi vq per virtio-blk
Date: Wed, 25 Jun 2014 23:05:56 -0600	[thread overview]
Message-ID: <53ABAA34.6070006@kernel.dk> (raw)
In-Reply-To: <1403748526-1923-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>

On 2014-06-25 20:08, Ming Lei wrote:
> Hi,
>
> These 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 on virtio-blk
> device can 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 change is 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-mq.1
>
> 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
> - with mutli-vq feature
> 	-- jobs=2, thoughput: 193K iops
> 	-- jobs=4, thoughput: 202K iops
>
> 2), about thoughput
> - without mutli-vq feature
> 	-- thoughput: 145K iops
> - with mutli-vq feature
> 	-- thoughput: 202K iops

Of these numbers, I think it's important to highlight that the 2 thread 
case is 33% faster and the 2 -> 4 thread case scales linearly (100%) 
while the pre-patch case sees negative scaling going from 2 -> 4 threads 
(-39%).

I haven't run your patches yet, but from looking at the code, it looks 
good. It's pretty straightforward. See feel free to add my reviewed-by.

Rusty, do you want to ack this (and I'll slurp it up for 3.17) or take 
this yourself? Or something else?


-- 
Jens Axboe

WARNING: multiple messages have this Message-ID (diff)
From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <ming.lei@canonical.com>, linux-kernel@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	linux-api@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v2 0/2] block: virtio-blk: support multi vq per virtio-blk
Date: Wed, 25 Jun 2014 23:05:56 -0600	[thread overview]
Message-ID: <53ABAA34.6070006@kernel.dk> (raw)
In-Reply-To: <1403748526-1923-1-git-send-email-ming.lei@canonical.com>

On 2014-06-25 20:08, Ming Lei wrote:
> Hi,
>
> These 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 on virtio-blk
> device can 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 change is 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-mq.1
>
> 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
> - with mutli-vq feature
> 	-- jobs=2, thoughput: 193K iops
> 	-- jobs=4, thoughput: 202K iops
>
> 2), about thoughput
> - without mutli-vq feature
> 	-- thoughput: 145K iops
> - with mutli-vq feature
> 	-- thoughput: 202K iops

Of these numbers, I think it's important to highlight that the 2 thread 
case is 33% faster and the 2 -> 4 thread case scales linearly (100%) 
while the pre-patch case sees negative scaling going from 2 -> 4 threads 
(-39%).

I haven't run your patches yet, but from looking at the code, it looks 
good. It's pretty straightforward. See feel free to add my reviewed-by.

Rusty, do you want to ack this (and I'll slurp it up for 3.17) or take 
this yourself? Or something else?


-- 
Jens Axboe


  parent reply	other threads:[~2014-06-26  5:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26  2:08 [PATCH v2 0/2] block: virtio-blk: support multi vq per virtio-blk Ming Lei
2014-06-26  2:08 ` Ming Lei
2014-06-26  2:08 ` [PATCH v2 1/2] include/uapi/linux/virtio_blk.h: introduce feature of VIRTIO_BLK_F_MQ Ming Lei
2014-06-26  2:08 ` Ming Lei
2014-06-26  2:08 ` [PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device Ming Lei
2014-06-26  2:08 ` Ming Lei
2014-06-26  7:45   ` Michael S. Tsirkin
2014-06-26  7:45     ` Michael S. Tsirkin
2014-06-26  8:23     ` Ming Lei
2014-06-26  8:23       ` Ming Lei
     [not found] ` <1403748526-1923-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2014-06-26  5:05   ` Jens Axboe [this message]
2014-06-26  5:05     ` [PATCH v2 0/2] block: virtio-blk: support multi vq per virtio-blk Jens Axboe
     [not found]     ` <53ABAA34.6070006-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2014-06-26  5:28       ` Ming Lei
2014-06-26  5:28         ` Ming Lei
2014-06-26  5:28     ` Ming Lei
2014-06-26  7:46     ` Michael S. Tsirkin
2014-06-26  7:46       ` Michael S. Tsirkin
2014-07-09  1:01     ` Rusty Russell
2014-07-09  1:01       ` Rusty Russell
2014-06-26  5:05 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2014-06-26  2:08 Ming Lei

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=53ABAA34.6070006@kernel.dk \
    --to=axboe-tswwg44o7x1aa/9udqfwiw@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
    --cc=mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org \
    --cc=stefanha-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    /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.