0

Below are the results for iostats:

Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
sda             120.94     10201.14      4354.87 64513033284 27540653120
sdb              63.65      3968.03      4354.86 25094207680 27540569008
md0             615.82      7432.50      4350.45 47003864466 27512714296
sdc               0.76         1.39       138.88    8770432  878321976

My questions are as below

  1. What I'd like to know is where iostat is getting this information from?
  2. I also notice that the Blk_read/s and Blk_wrtn/s for md0 appears to be an average of the two values. Is this correct?
  3. Why the tps differs significantly for md0 and the other hard drive?
  4. When running with internal set (iostat 1), the reads are usually on only hard drive? Is there a way to distribute the reads across hard drives more evenly?
  5. When running iostat with interval set, the values can differ significantly from time to time. Why am I getting this reading? e.g. The output below has a read request of 12 for both sda/sdb and a value of 190 for md0.

    Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util sda 5.00 185.00 46.00 12.00 11728.00 1547.00 228.88 0.56 9.71 4.34 25.20 sdb 0.00 185.00 0.00 12.00 0.00 1547.00 128.92 0.06 5.08 4.50 5.40 md0 0.00 0.00 51.00 190.00 11728.00 1520.00 54.97 0.00 0.00 0.00 0.00 sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00

supmethods
  • 275
  • 3
  • 14

1 Answers1

1

iostat reads from /proc/diskstats:

$ cat /proc/diskstats|grep xvd
 202       0 xvda 520666 4246 20785306 229576 7437051 9702824 137989688 9359030 0 1953230 9673210
 202      16 xvdb 13128 24069 297576 6090 22079 86786 870920 32713 0 15363 38740
 202      32 xvdc 497684 2427 23846898 258340 75265869 191974312 2137955584 80786246 0 11698503 81346596

Kernel.org has documentation on what all the fields are.

Additionally, the iostat man page contains pointers to all of its data sources:

FILES
       /proc/stat contains system statistics.

       /proc/uptime contains system uptime.

       /proc/diskstats contains disks statistics.

       /sys contains statistics for block devices.

       /proc/self/mountstats contains statistics for network filesystems.
EEAA
  • 108,414
  • 18
  • 172
  • 242