CentOS MySQL Optimization fourth session
=================================================
Version of rhel5.3 or so
Use VIM to open slow log and wq,mysqld not stop reading and writing slow log, resulting in mysqld unable to write data to slow log
: The handle has not changed after Wq write
Find handle data in/proc file system
Fd
Top, free, SAR
Vmstat
Vmstat-s m1procs-----------Memory-------------Swap-------io------System-------CPU-----R B swpd FreeBuff cache si so bi boinchCS US SyIDWA St0 0 422 the 239 402 0 0 1 137 3 6 0 0 the 6 0 0 0 422 the 239 402 0 0 0 0 in 108 0 0 - 0 0
Ye Jinlong (4700963) 20:53:16
Vmstat-s M 1:-s unit size in MB, shown once per second
-S,--unit character
Switches outputs between (k), 1024x768 (k), 1000000 (m), or 1048576 (m) bytes.
Note This does not a change of the swap (SI/SO) or block (Bi/bo) fields.
R: The number of processes waiting in the run queue.
B: The number of processes waiting for IO.
Vmstat In addition to the memory that column is MB, the IO and swap columns are in block units!!!!!
BI = block in to mem read from Disk,io
Bo = block out of mem write to Disk,io write
SI = block in to swap in from Disk,swap read
so = block out from swap out to Disk,swap write
US =%user
SY =%sys
id =%idle
WA =%iowait
ST = CPU resources stolen by virtual machines
263-Hu Tengpeng-Shenzhen (35465865) 21:17:34
Is there a way to swap high?
a230-Pengshusen-Shenzhen (10031145) 21:17:38
Why did swapoff-a take so long?
4G may be using larger swap, the system is writing the swap content to disk, need to wait a moment
Iostat
R/S, w/s
ioPS
RMB/S, wmb/s
Avgqu-sz is the length of the average request queue
F
CentOS MySQL Optimization fourth session