public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Stan Hoeppner <stan@hardwarefreak.com>
Cc: xfs@oss.sgi.com
Subject: Re: gather write metrics on multiple files
Date: Fri, 10 Oct 2014 08:07:32 +1100	[thread overview]
Message-ID: <20141009210732.GC4376@dastard> (raw)
In-Reply-To: <543611CF.6030904@hardwarefreak.com>

On Wed, Oct 08, 2014 at 11:40:47PM -0500, Stan Hoeppner wrote:
> Does anyone know of a utility that can track writes to files in an
> XFS directory tree, or filesystem wide for that matter, and gather
> filesystem blocks written per second data, or simply KiB/s, etc?
> I need to analyze an application's actual IO behavior to see if it
> matches what I'm being told the application is supposed to be
> doing.

iotop uses the task accounting infrastructure to give you
per-process IO stats:

Total DISK READ :      27.18 K/s | Total DISK WRITE :     395.10 M/s
Actual DISK READ:      27.18 K/s | Actual DISK WRITE:     395.10 M/s
  TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN     IO>    COMMAND
14822 be/4 dave       27.18 K/s  395.10 M/s  0.00 % 87.43 % dd if=/dev/zero of=foo bs=1024k count=16384 oflag=direct
 5430 be/4 dave        0.00 B/s    3.88 K/s  0.00 %  0.00 % plasma-desktop
    1 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % init [2]
    2 be/4 root        0.00 B/s    0.00 B/s  0.00 %  0.00 % [kthreadd]
....

For whole device stats, "iostat -d -x -m <device> 5" will get you 5
second averages of the IO to a device, request sizes, queue depths,
latencies, etc. blktrace/blkparse can give you way more information
that you care about in the IO subsystem - iowatcher (formerly
seekwatcher) is a good visualation tool that sits on top of
blktrace...

PCP (i.e using pmchart for live graphing of performance metrics) is
probably useful here, too.

As for limiting the stats gathering to a subset of the filesystem
there isn't really anything that does that. You probably would need
to do some perf or system tap magic to filter read/write ops
in some way. A good place to start might be here:

http://www.brendangregg.com/perf.html

Specifically his iosnoop tool is a simple template that you can customise to your
own needs:

http://www.brendangregg.com/blog/2014-07-16/iosnoop-for-linux.html
http://www.brendangregg.com/blog/2014-07-23/linux-iosnoop-latency-heat-maps.html

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      parent reply	other threads:[~2014-10-09 21:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09  4:40 gather write metrics on multiple files Stan Hoeppner
2014-10-09  4:49 ` Joe Landman
2014-10-09  5:24   ` Stan Hoeppner
2014-10-09 21:13     ` Dave Chinner
2014-10-09 22:30       ` Stan Hoeppner
2014-10-18  6:03       ` Stan Hoeppner
2014-10-18 18:16         ` Stan Hoeppner
2014-10-19 22:24           ` Dave Chinner
2014-10-21 23:56             ` Stan Hoeppner
2014-10-25  2:28               ` Stan Hoeppner
2014-10-09 21:07 ` Dave Chinner [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=20141009210732.GC4376@dastard \
    --to=david@fromorbit.com \
    --cc=stan@hardwarefreak.com \
    --cc=xfs@oss.sgi.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