CentOS MySQL Optimization fourth session

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.