All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sitsofe Wheeler <sitsofe@gmail.com>
To: Debraj Manna <subharaj.manna@gmail.com>
Cc: fio <fio@vger.kernel.org>
Subject: Re: fio reporting high value of read iops at iodepth 1
Date: Sun, 24 May 2020 10:45:09 +0100	[thread overview]
Message-ID: <CALjAwxhdtWFCW5GYRk9Va2=VFkgOr4sGrckUy_h8H267SxatWA@mail.gmail.com> (raw)
In-Reply-To: <CAF6DVKOP3wKpeQV_DHH-F62dOTkZpeMG+02f3ppi7cRbbiwdGQ@mail.gmail.com>

On Fri, 22 May 2020 at 17:54, Debraj Manna <subharaj.manna@gmail.com> wrote:
>
> One more query
>
> "maybe check how many I/Os the kernel sent to disk versus those that
> fio was asked to do" - For this can I rely on iostat or do you
> recommend any other tool?

You could do it by manually reading the disk stats collected in
/sys/block/<device>/stat just before the I/O starts but then you'd
have to somehow know when the actual part of the real job starts
rather than when you were doing layout etc. Further, I believe those
are the underlying files that iostat may use for monitoring anyway (it
can also use /proc/diskstats but you can see what iostat does by
tracing through both branches around
https://github.com/sysstat/sysstat/blob/b5fd09323bdbd36e34472ee448563f8a7fd34464/iostat.c#L2006
)...

...but you already have processed versions statistics in your fio
output. For example in your RUN 1 you had this:
[...]
> bw-test: (groupid=0, jobs=1): err= 0: pid=48575: Fri May 15 18:42:15 2020
[...]
>   IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
[...]
>      issued    : total=r=51200/w=0/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
[...]
> Disk stats (read/write):
>     dm-6: ios=48310/2, merge=0/0, ticks=3944/0, in_queue=3972,
> util=90.95%, aggrios=51200/40, aggrmerge=0/205, aggrticks=4048/0,
> aggrin_queue=4048, aggrutil=87.75%
>   sda: ios=51200/40, merge=0/205, ticks=4048/0, in_queue=4048, util=87.75%

The "Disk stats (read/write)" show what went out of relevant block
layer devices while your job was running and is mentioned in the fio
documentation (e.g.
https://fio.readthedocs.io/en/latest/fio_doc.html#interpreting-the-output
). Be aware that the stats may also cover I/O not generated by your
job (e.g. I/O done by other processes that was sent to disk,
filesystem metadata I/O etc.) but it's as close as you're going to get
without reaching deeper into the kernel. This is why it's important to
use as quiet a system as possible to avoid interference/contamination.

Looking closer, something interesting in your results is that fio says
it issued 51200 read I/Os but the device mapper device (dm-6, which
your filesystem is presumably on) apparently only saw 48310 reads AND
saw 2 writes (which suggests something else was happening on that
device as your fio job wouldn't have been issuing writes at that
point). Curiously the underlying block device to your device mapper
device (sda) saw 51200 reads and 40 writes. That might be because the
time the underlying block stats were read was ever so slightly later
than that of when the device mapper stats were read or because some
other device mapper device was also sending I/O to sda (also note some
merging of writes also took place but no merging of reads did).

-- 
Sitsofe | http://sucs.org/~sits/


  reply	other threads:[~2020-05-24  9:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 14:53 fio reporting high value of read iops at iodepth 1 Debraj Manna
2020-05-16 15:29 ` Sitsofe Wheeler
2020-05-16 16:28   ` Debraj Manna
2020-05-16 16:33     ` Debraj Manna
2020-05-22  9:01       ` Debraj Manna
2020-05-22 16:04         ` Sitsofe Wheeler
2020-05-22 16:54           ` Debraj Manna
2020-05-24  9:45             ` Sitsofe Wheeler [this message]
     [not found]               ` <CAF6DVKOZvOYw75v-b-JpqG3vPB6O04GnG765zv1ymNisxOuoiw@mail.gmail.com>
2020-05-25  6:21                 ` Debraj Manna

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='CALjAwxhdtWFCW5GYRk9Va2=VFkgOr4sGrckUy_h8H267SxatWA@mail.gmail.com' \
    --to=sitsofe@gmail.com \
    --cc=fio@vger.kernel.org \
    --cc=subharaj.manna@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.