All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
To: "Benoît Canet" <benoit@irqsave.net>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: fix bdrv_exceed_iops_limits wait computation
Date: Wed, 20 Mar 2013 18:55:28 +0800	[thread overview]
Message-ID: <1363776931.32706.59.camel@f15> (raw)
In-Reply-To: <1363770734-30970-2-git-send-email-benoit@irqsave.net>

Reviewed-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>

On Wed, 2013-03-20 at 10:12 +0100, Benoît Canet wrote:
> This patch fix an I/O throttling behavior triggered by limiting at 150 iops
> and running a load of 50 threads doing random pwrites on a raw virtio device.
> 
> After a few moments the iops count start to oscillate steadily between 0 and a
> value upper than the limit.
> 
> As the load keep running the period and the amplitude of the oscillation
> increase until io bursts reaching the physical storage max iops count are
> done.
> 
> These bursts are followed by guest io starvation.
> 
> As the period of this oscillation cycle is increasing the cause must be a
> computation error leading to increase slowly the wait time.
> 
> This patch make the wait time a bit smaller and tests confirm that it solves
> the oscillating behavior.
> 
> Signed-off-by: Benoit Canet <benoit@irqsave.net>
> ---
>  block.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block.c b/block.c
> index 0a062c9..455d8b0 100644
> --- a/block.c
> +++ b/block.c
> @@ -3739,7 +3739,7 @@ static bool bdrv_exceed_iops_limits(BlockDriverState *bs, bool is_write,
>      }
> 
>      /* Calc approx time to dispatch */
> -    wait_time = (ios_base + 1) / iops_limit;
> +    wait_time = ios_base / iops_limit;
>      if (wait_time > elapsed_time) {
>          wait_time = wait_time - elapsed_time;
>      } else {

-- 
Regards,

Zhi Yong Wu

  reply	other threads:[~2013-03-20 10:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20  9:12 [Qemu-devel] [PATCH] Fix I/O throttling pathologic oscillating behavior Benoît Canet
2013-03-20  9:12 ` [Qemu-devel] [PATCH] block: fix bdrv_exceed_iops_limits wait computation Benoît Canet
2013-03-20 10:55   ` Zhi Yong Wu [this message]
2013-03-20 13:29   ` Stefan Hajnoczi
2013-03-20 14:28     ` Stefan Hajnoczi
2013-03-20 14:56       ` Benoît Canet
2013-03-20 15:12         ` Stefan Hajnoczi
2013-03-21  1:18           ` Zhi Yong Wu
2013-03-21  9:17             ` Stefan Hajnoczi
2013-03-21 13:04               ` Zhi Yong Wu
2013-03-21 15:14                 ` Stefan Hajnoczi
2013-03-20 15:27       ` Benoît Canet
2013-03-21 10:34         ` Stefan Hajnoczi
2013-03-21 14:28           ` Benoît Canet

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=1363776931.32706.59.camel@f15 \
    --to=wuzhy@linux.vnet.ibm.com \
    --cc=benoit@irqsave.net \
    --cc=kwolf@redhat.com \
    --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.