1. I/O tuning
The iostat command output under CentOS is as follows:
$iostat-D-K 1 2 # view TPS and throughput
The parameter-D indicates that the device (disk) usage status is displayed; k Some columns that use block are forced to use kilobytes; 1 10 indicates that the data is refreshed every 1 seconds and is displayed 2 times.
TPS: The number of times the device is transferred per second, which is an 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 per second, KB_WRTN/S: The amount of data written to the device per second, Kb_read: Total data Read, KB_WRTN: The total amount of data written, and the units are kilobytes.
Common usage is as follows:
iostat-d-x-k 1 2 # View Device usage (%util), Response time (r_await/w_await)
If%util is close to 100%, it indicates that there are too many I/O requests, the I/O system is full, and the disk may have bottlenecks.
Avgqu-sz is also an IO tuning need to pay attention to, this is the direct operation of the size of the data, if the number of times, but the small amount of data, in fact, the IO will be very small. If the data is large, the IO data will be high
Iostat-c 1 2 # View CPU Status
Idle less than 70% io pressure is larger, the general reading speed has more wait.
Vmstat 2 1 # 2 seconds sampled, 1 times
b indicates the number of processes waiting for the resource; WA indicates the percentage of CPU time that IO waits for, higher than 30% when IO pressure is high
Reference article:
Http://www.ha97.com/4546.html
Sword refers to the tuning of the architect series-linux