All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Radha Ramachandran <radha@google.com>
Cc: fio@vger.kernel.org
Subject: Re: rate option doesnt work with libaio engine
Date: Wed, 9 Dec 2009 22:30:34 +0100	[thread overview]
Message-ID: <20091209213033.GB8742@kernel.dk> (raw)
In-Reply-To: <66dfd3fe0912091132o7f7164d0r5af02cfe8f63f8e1@mail.gmail.com>

On Wed, Dec 09 2009, Radha Ramachandran wrote:
> Hi,
> The rate option currently doesnt work when used with libaio engine.
> The math currently, calculates the time t2 (when the I/O completed) -
> t1 (when the io_u unit was created) as the time it takes for the I/O
> and the bandwidth for the rate calculation is calculated from that.
> This math will work correctly for sync engine as there is only one io
> in progress at a time, but for libaio engine, when there are multiple
> I/Os queued, the same time (as in from t1 to t2) could be attributed
> to other I/Os as well so the actual bandwidth is actually higher.
> I have a patch, but this is more brute force where I take the total
> bytes read/written divided by the time since I/Os started to calculate
> the bandwidth and decide on the time that needs to be spent sleeping
> (if any).This is a little more heavy weight than the previous math. I
> think there are probably simpler/cleaner solutions than this but this
> is the current patch I have for it.

Good analysis, yeah it definitely is broken currently, it basically
turns out to be rate*iodepth. Which is broken, of course. I have applied
your patch in lieu of a better idea. Don't worry about the bit of extra
math. I try to keep fio lean (and it is), the biggest problem is usually
the huge amounts of gettimeofday() calls when you do high iops counts.

-- 
Jens Axboe


      reply	other threads:[~2009-12-09 21:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-09 19:32 rate option doesnt work with libaio engine Radha Ramachandran
2009-12-09 21:30 ` Jens Axboe [this message]

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=20091209213033.GB8742@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=fio@vger.kernel.org \
    --cc=radha@google.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.