From: "Michael S. Tsirkin" <mst@redhat.com>
To: Denis Plotnikov <dplotnikov@virtuozzo.com>
Cc: fam@euphon.net, kwolf@redhat.com, vsementsov@virtuozzo.com,
ehabkost@redhat.com, qemu-block@nongnu.org, stefanha@redhat.com,
qemu-devel@nongnu.org, mreitz@redhat.com, pbonzini@redhat.com,
den@virtuozzo.com
Subject: Re: [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk
Date: Thu, 30 Jan 2020 08:40:18 -0500 [thread overview]
Message-ID: <20200130084000-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200129140702.5411-3-dplotnikov@virtuozzo.com>
On Wed, Jan 29, 2020 at 05:07:00PM +0300, Denis Plotnikov wrote:
> The goal is to reduce the amount of requests issued by a guest on
> 1M reads/writes. This rises the performance up to 4% on that kind of
> disk access pattern.
>
> The maximum chunk size to be used for the guest disk accessing is
> limited with seg_max parameter, which represents the max amount of
> pices in the scatter-geather list in one guest disk request.
>
> Since seg_max is virqueue_size dependent, increasing the virtqueue
> size increases seg_max, which, in turn, increases the maximum size
> of data to be read/write from guest disk.
>
> More details in the original problem statment:
> https://lists.gnu.org/archive/html/qemu-devel/2017-12/msg03721.html
>
> Suggested-by: Denis V. Lunev <den@openvz.org>
> Signed-off-by: Denis Plotnikov <dplotnikov@virtuozzo.com>
looks good but let's just patch each device separately.
> ---
> hw/core/machine.c | 3 +++
> include/hw/virtio/virtio.h | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 3e288bfceb..8bc401d8b7 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -28,6 +28,9 @@
> #include "hw/mem/nvdimm.h"
>
> GlobalProperty hw_compat_4_2[] = {
> + { "virtio-blk-device", "queue-size", "128"},
> + { "virtio-scsi-device", "virtqueue_size", "128"},
> + { "vhost-blk-device", "virtqueue_size", "128"},
> { "virtio-blk-device", "x-enable-wce-if-config-wce", "off" },
> { "virtio-blk-device", "seg-max-adjust", "off"},
> { "virtio-scsi-device", "seg_max_adjust", "off"},
> diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
> index a66ea2368b..16d540e390 100644
> --- a/include/hw/virtio/virtio.h
> +++ b/include/hw/virtio/virtio.h
> @@ -48,7 +48,7 @@ size_t virtio_feature_get_config_size(VirtIOFeature *features,
> typedef struct VirtQueue VirtQueue;
>
> #define VIRTQUEUE_MAX_SIZE 1024
> -#define VIRTQUEUE_DEFAULT_SIZE 128
> +#define VIRTQUEUE_DEFAULT_SIZE 256
>
> typedef struct VirtQueueElement
> {
> --
> 2.17.0
next prev parent reply other threads:[~2020-01-30 13:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-29 14:06 [PATCH v1 0/4] Increase default virtqueue size to improve performance Denis Plotnikov
2020-01-29 14:06 ` [PATCH v1 1/4] virtio: introduce VIRTQUEUE_DEFUALT_SIZE instead of hardcoded constants Denis Plotnikov
2020-01-29 17:02 ` Philippe Mathieu-Daudé
2020-01-29 17:55 ` Cornelia Huck
2020-01-30 14:56 ` Stefan Hajnoczi
2020-02-03 12:15 ` Denis Plotnikov
2020-01-30 13:38 ` Michael S. Tsirkin
2020-02-03 12:17 ` Denis Plotnikov
2020-02-03 12:51 ` Michael S. Tsirkin
2020-02-03 12:56 ` Denis Plotnikov
2020-01-29 14:07 ` [PATCH v1 2/4] virtio: increase virtuqueue size for virtio-scsi and virtio-blk Denis Plotnikov
2020-01-30 13:40 ` Michael S. Tsirkin [this message]
2020-02-03 12:18 ` Denis Plotnikov
2020-01-30 14:58 ` Stefan Hajnoczi
2020-02-04 9:59 ` Denis Plotnikov
2020-02-05 11:19 ` Stefan Hajnoczi
2020-02-07 8:48 ` Denis Plotnikov
2020-02-07 16:13 ` Stefan Hajnoczi
2020-02-09 7:49 ` Michael S. Tsirkin
2020-02-10 15:34 ` Denis Plotnikov
2020-02-11 10:32 ` Michael S. Tsirkin
2020-02-10 17:06 ` Stefan Hajnoczi
2021-09-08 13:17 ` Stefano Garzarella
2021-09-08 13:22 ` Stefano Garzarella
2021-09-08 15:20 ` Denis Plotnikov
2021-09-09 8:28 ` Stefano Garzarella
2021-09-09 11:26 ` Denis Plotnikov
2020-01-29 14:07 ` [PATCH v1 3/4] tests: add virtuqueue size checking to virtio_seg_max_adjust test Denis Plotnikov
2020-01-30 13:42 ` Michael S. Tsirkin
2020-02-03 12:21 ` Denis Plotnikov
2020-01-29 14:07 ` [PATCH v1 4/4] tests: rename virtio_seg_max_adjust to virtio_check_params Denis Plotnikov
2021-09-08 15:45 ` Philippe Mathieu-Daudé
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=20200130084000-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=den@virtuozzo.com \
--cc=dplotnikov@virtuozzo.com \
--cc=ehabkost@redhat.com \
--cc=fam@euphon.net \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=vsementsov@virtuozzo.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).