Recently found that PHP running automatically load class functions always timed out, tracking php slow query log, found that the program card in the Include a class file unexpectedly timeout.
Initial location is IO response Timeout, hard drive read problem.
Navigate through several commands:
iostat-d-x-k 1 10//Run 10 view iostat The wait parameter is large, generally no more than 5ms,await SVCTM the closer the 2 parameters, the better IO performance.
Refer to other blogs,
Await: The average time of processing per IO request (in microseconds milliseconds). This can be understood as the response time IO, the general system IO response time should be less than 5ms, if more than 10ms is relatively large.
This time includes the queue time and service time, that is to say, in general, await is greater than SVCTM, their difference is smaller, then the shorter the queue time, the other difference is larger, the longer the queue time, indicating that the system has a problem. SVCTM represents the average service time, in milliseconds, for each device I/O operation. If the value of SVCTM is close to await, which means that there is almost no I/O waiting, disk performance is good and if the await value is much higher than the SVCTM value, the I/O queue waits too long and the application running on the system slows down.
sudo iotop-o,//View the program on the hard drive, view process IO occupancy ratio
sudo perf Top//view process IO occupancy ratio
sudo hdparm-t/dev/**** view disk read efficiency
Showing: Timing buffered disk reads:10 MB in 3.14 seconds = 3.18 Mb/sec
View non-interrupted sleep
While true; do date; PS AUXF | awk ' {if ($8== "D") print $} '; Sleep 1; Done
After tracking through the above command, hard drive reading efficiency is very low, further reasons, is still unknown, guess the hard drive has bad way.