All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Paolo Valente <paolo.valente@linaro.org>,
	Sitsofe Wheeler <sitsofe@gmail.com>
Cc: fio <fio@vger.kernel.org>
Subject: Re: time_based not working with randread
Date: Thu, 31 May 2018 08:38:18 -0600	[thread overview]
Message-ID: <14c60616-42dd-705a-1617-08c4a70e5a05@kernel.dk> (raw)
In-Reply-To: <42E4AE76-FC46-44EF-9B7A-430B0148E1AD@linaro.org>

On 5/31/18 2:55 AM, Paolo Valente wrote:
> 
> 
>> Il giorno 27 mag 2018, alle ore 16:24, Sitsofe Wheeler <sitsofe@gmail.com> ha scritto:
>>
>> Hi Paolo!
>>
>> On 25 May 2018 at 20:20, Paolo Valente <paolo.valente@linaro.org> wrote:
>>> Hi,
>>> if I run this job (even with the last version GitHub version of fio) on an SSD:
>>> [global]
>>> ioengine=sync
>>> time_based=1
>>> runtime=20
>>> readwrite=randread
>>> size=100m
>>> numjobs=1
>>> invalidate=1
>>> [job1]
>>>
>>> then, after little time (I think after 100MB have been read), fio reports a nonsensically large value for the throughput, while a simple iostat shows that no I/O is going on. By just replacing time_based with loops, i.e., with a job file like this:
>>>
>>> [global]
>>> ioengine=sync
>>> loops=1000
>>> readwrite=randread
>>> size=100m
>>> numjobs=1
>>> invalidate=1
>>> [job1]
>>>
>>> the problem disappears.
>>
>> I've taken a stab at fixing this over in
>> https://github.com/sitsofe/fio/tree/random_reinvalidate - does that
>> solve the issue for you too?
> 
> Nope :(
> 
>> ...
>> I know I'm "Teaching grandmother to suck eggs" given that you're the
>> author of BFQ but just in case...
>>
>> This issue happens on loops=1000 too and I believe it's down to
>> readahead.
> 
> I'm afraid there is a misunderstanding on this, grandson :)
> 
> As I wrote, this problem does not occur with loops=1000.  My
> impression is that, with loops, as well as with time-based and read,
> fio does invalidate the cache every time it restarts reading the same
> file, while with time_based and randread it does not (or maybe it
> tries to, but fails for some reason).

This is basically by design. loop will go through the full
open+invalidate, whereas time_based will just keep chugging
along. Once your 100mb is in page cache, then no more IO
will be done, as reads are just served from there.

-- 
Jens Axboe



  reply	other threads:[~2018-05-31 14:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 19:20 time_based not working with randread Paolo Valente
2018-05-27 14:24 ` Sitsofe Wheeler
2018-05-31  4:10   ` Sitsofe Wheeler
2018-05-31  8:55   ` Paolo Valente
2018-05-31 14:38     ` Jens Axboe [this message]
2018-05-31 14:49       ` Paolo Valente
2018-05-31 15:07         ` Jens Axboe
2018-06-04 15:15           ` Paolo Valente
2018-06-04 15:17             ` Jens Axboe

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=14c60616-42dd-705a-1617-08c4a70e5a05@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=paolo.valente@linaro.org \
    --cc=sitsofe@gmail.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.