Re: gather write metrics on multiple files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx

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




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux