0

I'm Looking for assistance with reading and decoding fio --bandwidth-log.

I've run the below command and the output includes a few columns as listed below, how to read and decode each column?

fio --invalidate=1 --filename=/dev/nvme0n1 --direct=1 --ioengine=libaio --iodepth=32 --time_based --runtime=3600 --bandwidth-log --name=/dev/nvme0n1 --rw=randread --bs=4k --log_avg_msec=1000

Output example (first few lines):

501, 334730, 0, 0, 0

1177, 647294, 0, 0, 0

1678, 985860, 0, 0, 0

2180, 948023, 0, 0, 0

2681, 967369, 0, 0, 0

3182, 977405, 0, 0, 0

3683, 982035, 0, 0, 0

  1. How to read the 1st column? No matter what period I provide for --timebased I get 1024 results in total.
  2. The 2nd column doesn't fit IOPS, nor BW in MB/s. I read somewhere that it is in KB/s and tried conversion which provides reasonable MB/s in some cases but doesn't mix RW commands.

If I read the fio man page it is only mention the below with no explanation:

--bandwidth-log

Generate aggregate bandwidth logs.

1 Answers1

1

According to fio(1), section LOG FILE FORMATS (latest version also available online):

Fio supports a variety of log file formats, for logging latencies, bandwidth, and IOPS. The logs share a common format, which looks like this:

  • time (msec), value, data direction, block size (bytes), offset (bytes), command priority

Time for the log entry is always in milliseconds. The value logged depends on the type of log, it will be one of the following:

  • Latency log: Value is latency in nsecs
  • Bandwidth log: Value is in KiB/sec
  • IOPS log: Value is IOPS

Data direction is one of the following:

  • 0: I/O is a READ
  • 1: I/O is a WRITE
  • 2: I/O is a TRIM

Note that, however, older versions of fio produces fewer fields. Always check the manual page shipped with your version of fio.

So your data should be interpreted, taking the first line for example:

501, 334730, 0, 0, 0
  • 501 ms since start of testing
  • 334,730 KiB/s measured for this duration
  • 0 = read operation
  • 0 (unable to determine from the current version of documentation)
  • 0 = command priority is normal
iBug
  • 1,212
  • 2
  • 13
  • 23