Home

Description

The iolat patch allows you to track IO submission time and service latencies, IO per IO, in an array you can access in the /proc/iolat/stats file. Submission time is the time the IO request stayed in the request queue; service time is the time the IO has been processed by the hardware. In addition, the IO size is also available. The stats file is shared for all block devices in the system.

Information about individual IO submission time and service latency is
available under the /proc/iolat folder.

Table 1-13: Files in /proc/iolat
..............................................................................
 File            Usage
 clear           clear the stats file
 disks           list of space separated disk names to record stats for
 max_records     a hint of the maximum stat records the system can keep
 nr_records      set the number of stat records the system keeps
 stats           actual statistics (see Table 1-14)
 trace_on        activate (1) or disable (0) stat recording
..............................................................................

The stats file contents the actual statistics information, one IO per line,
up to nr_records lines.

Table 1-14: Content of /proc/iolat/stats
..............................................................................
 Field           Content
 disk_name       name of the device where the IO has been issued
 rd_cl_queue     time (ns) when the IO has been queued (read)
 rd_cl_issue     time (ns) when the IO has been issued to the driver (read)
 rd_cl_compl     time (ns) when the IO has been complete (read)
 rd_address      location (sectors) of the IO (read)
 rd_sectors      read size (sectors)
 wr_cl_queue     time (ns) when the IO has been queued (write)
 wr_cl_issue     time (ns) when the IO has been issued to the driver (write)
 wr_cl_compl     time (ns) when the IO has been complete (write)
 wr_address      location (sectors) of the IO (write)
 wr_sectors      write size (sectors)
..............................................................................

 

Installation

 

wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.3.tar.xz
tar -xf linux-4.1.3.tar.xz
wget https://depot.gukinet.com/projects/iolat/src/patch-4.1.3-iolat-0.8
cd linux-4.1.3
patch -p1 < ../patch-4.1.3-iolat-0.8

 

 Usage

The following example shows a typical iolat session usage:

echo sda > /proc/iolat/disks
echo 1 > /proc/iolat/clear
echo 1 > /proc/iolat/trace_on

<some IO load on sda>

echo 0 > /proc/iolat/trace_on
cat /proc/iolat/stats > sda-stats.dat