View TPs and throughput information
[[Email protected] ~] #iostat-D-K 1 10
Device:tps kb_read/s kb_wrtn/s Kb_read Kb_wrtn
SDA 19.00 0.00 112.00 0 112
SDA1 0.00 0.00 0.00 0 0
SDA2 0.00 0.00 0.00 0 0
Sda3 0.00 0.00 0.00 0 0
SDA4 0.00 0.00 0.00 0 0
Sda5 3.00 0.00 16.00 0 16
Sda6 0.00 0.00 0.00 0 0
SDA7 16.00 0.00 96.00 0 96
TPS: The number of transmissions per second of the device, one transmission means "one I/O request"
KB_READ/S: The amount of data read from the device per second
KB_WRTN/S: The amount of data written to the device per second
Kb_read: Total amount of data read
KB_WRTN: Total amount of data written
Use-X for more information
Viewing device usage (%util), Response time (await)
[[Email protected] ~] #iostat-D-x-k 1 10
device:rrqm/s wrqm/s r/s w/s rkb/s wkb/s avgrq-sz avgqu-sz await SVCTM%util
SDA 0.00 22.00 0.00 18.00 0.00 160.00 17.78 0.07 3.78 3.78 6.80
SDA1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sda3 0.00 15.00 0.00 2.00 0.00 68.00 68.00 0.01 6.50 6.50 1.30
SDA4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
SDA5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Sda6 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
SDA7 0.00 7.00 0.00 16.00 0.00 92.00 11.50 0.06 3.44 3.44 5.50
rrqm/s: The number of read operations per second for the merge. That is, the delta (rmerge)/s
wrqm/s: the number of write operations per second for the merge. That is, Delta (wmerge)/s
r/s : the number of read I/O devices completed per second. Delta (RIO)/s
w/s: number of write I/O devices completed per second. The Delta (wio)/s
rsec/s: reads the number of sectors per second. That is, Delta ( Rsect)/s
wsec/s: number of write sectors per second. Delta (wsect)/s
rkb/s: read K bytes per second. It's half the rsect/s, Because the size of each sector is 512 bytes. (Calculation required)
wkb/s: writes K bytes per second. It's half the wsect/s. (Calculation required)
avgrq-sz: The data size (sector) of the average Per device I/O operation. Delta (Rsect+wsect)/delta (rio+wio)
avgqu-sz: average I/O queue length. That is, Delta ( AVEQ)/s/1000 (because the Aveq unit is milliseconds).
await: The average wait time (in milliseconds) per device I/O operation. Delta (Ruse+wuse)/delta (rio+wio)
svctm: average Per Device I The service time, in milliseconds, of the/O operation. That is, Delta (use)/delta (rio+wio)
%util: The amount of time in a second for I/O operations, Or how much time in a second I/O queues are non-empty. That is, the delta (use)/s/1000 (because the use is in milliseconds)
(if%util is close to 100%, it indicates that there are too many I/O requests and that the I/O system is full, the disk may have bottlenecks.
%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).
)
When deploying a program (I am testing a real-time upload log program), the system's CPU, memory, IO and so on should be considered, to ensure efficient operation of the system.
If the program itself handles a very small package, many events, high pressure and no interval, CPU resources will be much
If the disk cache, without memory cache, can support the re-transmission of the breakpoint, to ensure the reliability of the data upload, such as sudden power outage, etc., the data into the disk cache will still be uploaded after recovery, and will not be lost, but the relative will increase the number of read and write disk, if the amount of data is small, speed is tolerable
####################################################################################
http://blog.csdn.net/avilifans/article/details/12002019
Iostat View IO situation (8 ways to monitor Linux)