All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alberto Garcia <berto@igalia.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Nini Gu <ngu@redhat.com>, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-options: explain disk I/O throttling options
Date: Tue, 21 Feb 2017 11:58:00 +0100	[thread overview]
Message-ID: <w51tw7nbykn.fsf@maestria.local.igalia.com> (raw)
In-Reply-To: <20170220165204.1980-1-stefanha@redhat.com>

On Mon 20 Feb 2017 05:52:04 PM CET, Stefan Hajnoczi wrote:
> The disk I/O throttling options have been listed for a long time but
> never explained on the QEMU man page.

> +@item bps=@var{b},bps_rd=@var{r},bps_wr=@var{w}
> +Specify bandwidth throttling limits in bytes per second, either for all request
> +types or for reads or writes only.

Perhaps for the manual page it makes sense to use them, but bps, bps_rd,
etc. are the legacy names for those options. They're internally renamed
to throttling.bps-total, throttling.bps-read, ...

> Values must be larger than the maximum
> +request size to avoid timeouts or hangs in the guest.  At minimum use 2 MB/s
> +for disks.

Is this so? throttle_compute_wait() does not use the request size at
all. The size is used to do the accounting afterwards. In other words:
requests are not throttled if they exceed the limit, they are throttled
after the limit has been exceeded by previous requests.

A low limit will certainly slow down the guest and can cause
timeouts, but I don't know if being larger or smaller than the maximum
request size is what makes the difference.

> +@item bps_max=@var{bm},bps_rd_max=@var{rm},bps_wr_max=@var{wm}
> +Specify bursts in bytes per second, either for all request types or for reads
> +or writes only.  Bursts allow the guest I/O to spike above the limit
> +temporarily.  The default burst value is 1/10th of the limit.

"The default burst value is 1/10th of the limit" is an implementation
detail that the user doesn't need to know about. What it means is that a
bps limit of 10 MB/s is implemented internally as 1MB per 100ms.

I would leave that out, it doesn't even make sense that the burst limit
is lower than the normal limit, we actually forbid that (aaa1e77ffae52).

> +@item iops=@var{i},iops_rd=@var{r},iops_wr=@var{w}
> +Specify request rate limits in requests per second, either for all request
> +types or for reads or writes only.

> +@item bps_max=@var{bm},bps_rd_max=@var{rm},bps_wr_max=@var{wm}

You meant iops_max, iops_rd_max and iops_wr_max here?

Berto

  parent reply	other threads:[~2017-02-21 10:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 16:52 [Qemu-devel] [PATCH] qemu-options: explain disk I/O throttling options Stefan Hajnoczi
2017-02-20 19:40 ` Eric Blake
2017-02-21 11:25   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-02-21 10:58 ` Alberto Garcia [this message]
2017-02-22 11:14   ` [Qemu-devel] " Stefan Hajnoczi
2017-02-22 13:14     ` Alberto Garcia

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=w51tw7nbykn.fsf@maestria.local.igalia.com \
    --to=berto@igalia.com \
    --cc=ngu@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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 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.