To view or monitor disk read and write performance in Linux, you can use the Iostat command, which is described in this section for its specific use.
1. HDD Read/write performance
#查看TPS和吞吐量信息iostat-D-K 1 Device: TPs kb_read/s kb_wrtn/s kb_read kb_wrtnsda 14.54 417.21 368.06 15719357562 13867444535dm-0 104.60 415.64 366.87 15660312829 13822621684dm-1 0.69 1.57 1.19 59041280 44822840
-D: Show a specific hard disk, there is no hard drive path is the default all
-K: displayed in kilobytes
1: Statistical interval of 1 seconds
10: Total statistics 10 times
TPS: The number of transmissions per second of the device (indicate, transfers per second, were issued to the.). "One-time transfer" means "one-time I/O request". Multiple logical requests may be merged into "one I/O request". The size of the "one transfer" request is unknown.
kb_read/s: The amount of data read from the device (drive expressed) per second, KB_WRTN/S: The amount of data written to the device (drive expressed) per second, Kb_read: Total amount of data read; Kb_wrtn: Write The total amount of data, these units are kilobytes.
the initial value is large because the cumulative read and write volume is displayed.
2. Iostat-x parameters, viewing device utilization (%UTIL), Response time (await)
iostat-d-k-x 1 10Device: rrqm/s wrqm/s r/s w/s rkb/s wkb/s avgrq-sz Avgqu-sz await SVCTM %utilsda 4.87 85.88 8.41 6.14 417.21 368.06 107.98 0.02 8.92 2.73 3.97dm-0 0.00 0.00 12.89 91.72 415.64 366.87 14.96 0.06 1.70 0.38 3.95dm-1 0.00 0.00 0.39 0.30 1.57 1.19 8.00 0.02 35.25 1.45 0.10
rqm/s: How much of this device-dependent read request is merged per second (when the system call needs to read the data, the VFS sends the request to each FS, and if FS finds that different read requests read the same block data, FS merges the request into merge) WRQM/S: How much of this device-related write request is being merge per second.
R/S: Number of Read requests per second in response, w/s: Number of Write requests per second, rkb/s: Amount of data read per second, wkb/s: Amount of data written per second
Await: The average time (in microseconds) of processing per IO request. This can be understood as the response time of IO, generally the system IO response time should be less than 5ms, if greater than 10ms is relatively large.
%util: All processing io time, divided by total statistic time, in the statistical time. For example, if the statistic interval is 1 seconds, the device has 0.8 seconds to process Io, and 0.2 seconds is idle, then the device's%util = 0.8/1 = 80%, so this parameter implies the device's busy level. Generally, if this parameter is 100% indicates that the device is already running close to full load (of course if it is a multi-disk, even if%util is 100% because of the concurrency of the disk, disk usage may not be the bottleneck).
Linux view disk read and write performance (Iostat command) method