We build this system based on Inception (Qunar)。
All of MySQL DDL/DML operations are based on Donkey system, with strict approval process to keep online system strong and available.
Open this file by Mockplus Donkey-system
I found a useful tool named sniffer to help us analyze network packages (this tool can capture packages on specific port)
I use sniffer to analyze mysql and redis packages (translate these packages to normal queries)
vc-redis-sniffer is a utility from VividCortex to monitor query activity and write results to a file. See --license for the terms governing your usage of this program. -binding="[::]:6379" This is a list of comma separated bind strings as seen in /proc/net/tcp -help="false" Show this usage message -license="false" Print the usage terms of this program -output="" Filepath to output queries to. Defaults to stdout if none specified. -show-database="false" Include a 'USE `database`' for every statement. Supersedes show-database-changes. -show-database-changes="false" …[Read more]
We could use inotify-tools to monitor file or directory IO state
yum install inotify-tools
#inotifywait -m /storage/sas/mysql3306/data/diablo_im/#sql-ib4747-2643139248.ibd
Setting up watches. Watches established. /storage/sas/mysql3306/data/diablo_im/#sql-ib4747-2643139248.ibd MODIFY /storage/sas/mysql3306/data/diablo_im/#sql-ib4747-2643139248.ibd MODIFY /storage/sas/mysql3306/data/diablo_im/#sql-ib4747-2643139248.ibd MODIFY /storage/sas/mysql3306/data/diablo_im/#sql-ib4747-2643139248.ibd MODIFY /storage/sas/mysql3306/data/diablo_im/#sql-ib4747-2643139248.ibd MODIFY /storage/sas/mysql3306/data/diablo_im/#sql-ib4747-2643139248.ibd MODIFY …[Read more]
how to use percona-tookit to verify mysql data
Read this PDF : mysql_checksum
MySQL Tcpdump system : use percona-toolkit to analyze network packages
We can identify problem SQLs with high execution frequency.
With DBMON system and AWR system we can find problem SQLs in a special time (high frequency, occurs over a period of time)
View this PDF:
We can use iopp tool to monitor process io performance
download from github : https://github.com/markwkm/iopp
pid: The process id. rchar: The number of bytes which this task has caused to be read from storage. wchar: The number of bytes which this task has caused, or shall cause to be written to disk. syscr: Count of the number of read I/O operations. syscw: Count of the number of write I/O operations. rbytes rkb rmb reads: Count of the number of bytes which this process really did cause to be fetched from the storage layer. wbytes wkb wmb writes: Count of the number of bytes which this process really did cause to be sent to the storage layer. cwbytes cwkb cwmb cwrites: The number of bytes which this process caused to not happen, by truncating pagecache. command: Filename of the executable.
There is one small bug , you’ll get different output from -i -k than you will from -i or …[Read more]
Today I read a nice article , which give a new design for mysql database . In this article , Author (Mr.lou) uses OneSQL (a branch of MySQL) for the whole test.
you can read from : http://www.onexsoft.com/?page_id=378
This article explain how to use mysql in seckilling scenario (especially for E-Commerce commany )
If you want to use transaction in RDBMS database, you must manual
start transaction and commit in the end of your operation.
So,commit will be cost of the total process, round-trip cost will be the most important cost as author said
(For simple update operations, without regard to conflict of IO and locks, a statement execution time is about 0.1ms, network delay under normal conditions is 0.4-0.8ms, that the waiting time is longer than the transaction commit time to really notice the SQL execution several times, showing that the …[Read more]
This Thursday (February 19th, 14:00 UTC), MC Brown
& Trond Norbye will give a MySQL University session on
Developing MySQL on Solaris. MC works on the
MySQL Documentation Team and has been involved with quite a few
Solaris things, for example porting MySQL to openSolaris. Trond
has been involved with many things, including openSolaris,
as you can
see from his blog.
For MySQL University sessions, point your browser to this page. You need a browser with a working Flash plugin. You may register for a Dimdim account, but you don't have to. (Dimdim is the conferencing system we're using for MySQL University sessions. It …[Read more]
The VM for Linux prefers system cache over application memory.
What does this mean? The best way I can explain is by
Imagine you have 32 GB of RAM
MySQL is set to take 20 GB of RAM for a process based buffer and up to 6M for the various thread buffers.
Over a period of time the box swaps. The only thing that is running is mysql and its memory size is around 21GB for resident memory. Why does swap grow when there is plenty of memory? The reason is when a memory alloc is needed (thread based buffer is tickled) the VM will choose to use swap over allocating from the system cache, when there is not enough free memory.
DO NOT TURN OFF SWAP to prevent this. Your box will crawl, kswapd will chew up a lot of the processor, Linux needs swap enabled, lets just hope its not used.
So how do you stop Nagios pages because of swap usage? Well if you have a few choices.