From: Jens Axboe <axboe@kernel.dk>
To: Steven Lang <tirea@google.com>
Cc: fio@vger.kernel.org
Subject: Re: Something odd with the fio random offset generator & time_based runs
Date: Mon, 20 Feb 2012 10:18:14 +0100 [thread overview]
Message-ID: <4F420FD6.10907@kernel.dk> (raw)
In-Reply-To: <CAAUT-yOd-gnfN-tEC3SY-RcBON5tYqOz6DyRqXfwNyGq71mPgA@mail.gmail.com>
On 02/18/2012 02:31 AM, Steven Lang wrote:
> Looking into it more, what seems to be going on is that after writing
> td->o.size bytes, a time_based job silently closes all open files,
> resets, and starts over. Part of the process of resetting involves
> re-seeding all the random numbers.
>
> It seems like there are other implications to the reset as well. For
> example, in async ioengines it drains all the remaining IO, which
> results in less throughput. Potentially latency numbers could be
> effected as well, either positively or negatively.
>
> Would it make sense, for time_based runs, to not break out of the loop
> in do_io() so the state doesn't get reset? This would also allow the
> removal of the check in keep_running() for time_based, which would
> then allow "time_based" and "loops" to be used together in a
> meaningful way.
>
> At first blush, this would probably just be a case of adding "||
> (td->o.time_based)" to the loop condition in do_io(), and that
> certainly addressed the case of random IO whe norandommap I initially
> saw. But the same performance issues could apply to sequential loads
> and random mapped loads, and just changing the loop condition didn't
> have any effect on that. There is something else which is determining
> that the end condition is met for sequential loads, read_iolog loads,
> and randommap loads. (For read_iolog loads, time_based and loops have
> no effect, so I'm not sure the value of changing that.)
>
> Would it be difficult to change the behavior so only loops= causes
> do_io() to be called repeatedly like that?
I agree that the correct solution would be to NOT jump out of the loop
and just keep going for time_based. As you point out, it might need
another change or two to ensure that we handle every condition. For
things like random map, we do need to clear it when it's full (or close
to), but that need not reset everything.
Do you have any time to hunt this further?
--
Jens Axboe
next prev parent reply other threads:[~2012-02-20 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-18 1:19 Something odd with the fio random offset generator & time_based runs Steven Lang
2012-02-18 1:31 ` Steven Lang
2012-02-20 9:18 ` Jens Axboe [this message]
2012-02-21 22:19 ` Steven Lang
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=4F420FD6.10907@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=tirea@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox