Install unzip at in CentOS source code
Install unzip at in source code:
# Wget http://perso.orange.fr/sebastien.godard/sysstat-8.0.4.1.tar.gz
# Tar zxvf sysstat-8.0.4.1.tar.gz
# Cd sysstat-8.0.4.1
#./Configure
# Make
# Make install
Use iostat to analyze servers under too much pressure:
$ Iostat-x 1
Linux 2.6.33-fukai (fukai-laptop) _ i686 _ (2 CPU)
Avg-cpu: % user % nice % system % iowait % steal % idle
5.47 0.50 8.96 48.26 0.00 36.82
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm % util
Sda 6.00 273.00 99.00 7.00 2240.00 2240.00 42.26 1.12 10.57 7.96 84.40
Sdb 0.00 4.00 0.00 350.00 0.00 2068.00 5.91 0.55 1.58 0.54 18.80
Description of output options:
Rrqm/s: the number of merge read operations per second. That is, delta (rmerge)/s.
Wrqm/s: Number of write operations performed on merge per second. That is, delta (wmerge)/s
R/s: The number of read I/O devices completed per second. That is, delta (rio)/s.
W/s: the number of write I/O devices completed per second. That is, delta (wio)/s
Rsec/s: Number of read sectors per second. That is, delta (rsect)/s
Wsec/s: Number of write sectors per second. That is, delta (wsect)/s
RkB/s: the number of K Bytes read per second. It is half of rsect/s, because the size of each sector is 512 bytes. (calculated)
WkB/s: the number of K bytes written per second. Half of wsect/s (to be calculated)
Avgrq-sz: average data size (slice) of each device I/O operation. delta (rsect + wsect)/delta (rio + wio)
Avgqu-sz: Average I/O queue length, that is, delta (aveq)/s/1000 (because aveq is measured in milliseconds ).
Await: average wait time for each device I/O operation (MS). That is, delta (ruse + wuse)/delta (rio + wio)
Svctm: Average service time for each device I/O operation (MS). That is, delta (use)/delta (rio + wio)
% Util: the percentage of time in one second for I/O operations, or the number of I/O queues in one second is not empty. that is, delta (use)/s/1000 (because the Unit of use is milliseconds)
Note:
% Util is close to 100%, indicating that too many I/O requests are generated. The I/O system is fully loaded and the disk may have a bottleneck.
When the idle is less than 70% I/O, the load is high. Generally, the read speed is wait.
You can also view the parameters B (number of processes waiting for resources) and wa in combination with vmstat (percentage of CPU time occupied by I/O wait, higher than 30% when I/O pressure is high)
In addition, await parameters should also be referenced by svctm. If there are too many differences, I/O problems may exist.
Avgqu-sz is also a place to note when performing IO optimization. It is the data size of each operation directly.
If the number of times is large but the data is small, I/O will be very small.
If the data is big, the IO data will be high. You can also use avgqu-sz × (r/s or w/s) = rsec/s or wsec/s, that is, the read/write speed is determined by it.