From: Jens Axboe <axboe@kernel.dk>
To: Brian Carey <brian@careydrive.com>
Cc: fio@vger.kernel.org
Subject: Re: Random IO pattern ratios
Date: Thu, 25 Apr 2013 21:44:52 -0600 [thread overview]
Message-ID: <20130426034452.GN9563@kernel.dk> (raw)
In-Reply-To: <CAEzQZ4AEx5ioBUMR2HieVe9eoi2iwu-mFdEPdTkuPci55jBqHQ@mail.gmail.com>
On Thu, Apr 25 2013, Brian Carey wrote:
> Hello all,
>
> I'm fairly new to fio and am trying to vary the ratio of sequential to
> random IO per job. I'm not sure if I'm reading the section of the
> HowTo on mixed IO types right or not . I'm trying to have the first
> job do 100% sequential access, the 2nd do 50% sequential/50% random,
> and the 3rd do 100% random. Below is the section of the How To that
> I'm referring to as well as a snip of my config.
>
> For the mixed io types, the default is to split them 50/50.
> For certain types of io the result may still be skewed a bit,
> since the speed may be different. It is possible to specify
> a number of IO's to do before getting a new offset, this is
> one by appending a ':<nr>' to the end of the string given.
> For a random read, it would look like 'rw=randread:8' for
> passing in an offset modifier with a value of 8. If the
> suffix is used with a sequential IO pattern, then the value
> specified will be added to the generated offset for each IO.
> For instance, using rw=write:4k will skip 4k for every
> write. It turns sequential IO into sequential IO with holes.
> See the 'rw_sequencer' option.
>
> [4k 70/30% R/W - 100% seq]
> bs=4k
> rw=rw
> rwmixread=70
> rwmixwrite=30
> stonewall
>
> [4k 70/30% R/W - 50% seq]
> bs=4k
> rw=randrw:2
> rwmixread=70
> rwmixwrite=30
> stonewall
>
> [4k 70/30% R/W - 0% seq]
> bs=4k
> rw=randrw
> rwmixread=70
> rwmixwrite=30
> stonewall
It looks correct. For the middle one, the way fio will behave is that it
will generate a random offset, read 4k from that, then read 4k again,
then generate a new random offset. So it's 50/50 random/seq in the sense
that for each seek, you will have two sequential IOs. Which means that
every IO will be either sequential to the former, or completely random.
That, in essense, is 50% random and 50% sequential. Outside of that,
there's currently no way to tell fio to do X ios randomly, then Y ios
sequentially. If 1/1 is good enough, then the job as listed will get
that done.
Job 1/3 are straight forward and do what you are looking for without
doubt.
--
Jens Axboe
next prev parent reply other threads:[~2013-04-26 3:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-25 14:47 Random IO pattern ratios Brian Carey
2013-04-26 3:44 ` Jens Axboe [this message]
2013-04-26 4:32 ` John Williams
2013-04-26 11:49 ` Brian Carey
2013-04-26 11:53 ` Brian Carey
2013-04-26 13:42 ` Jens Axboe
2013-04-26 14:47 ` Jens Axboe
2013-04-26 14:57 ` Jens Axboe
2013-04-26 17:52 ` John Williams
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=20130426034452.GN9563@kernel.dk \
--to=axboe@kernel.dk \
--cc=brian@careydrive.com \
--cc=fio@vger.kernel.org \
/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