Frequently Used mysql performance indicator 1, obtain the total number of processes under a mysql user ps-ef | awk '{print $1}' | grep "mysql" | grep-v "grep" | wc-1 2, host performance status # uptime [root @ ~] # Uptime 13:05:52 up 53 days, 52 min, 1 user, load average: 0.00, 0.00, 0.00 3, CPU usage # top or # vmstat 4, disk IO Volume # vmstat or # iostat www.2cto.com 5. swap inbound/outbound [Memory] # free 6. database performance status (1) QPS (Query volume per second) QPS = Questions (or Queries) /secondsmysql> show/* 50000 global */status like 'Question '; (2) TPS (transaction volume per second) www.2cto.com TPS = (Com_commit + Com_rollback) /secondsmysql> show status like 'com _ commit '; mysql> show status like 'com _ rollback'; (3) key Buffer hit rate key_buffer_read_hits = (1-key_reads/key_read_requests) * 100% key_buffer_write_hits = (1-key_writes/key_write_requests) * 100% mysql> show status like 'key % '; www.2cto.com (4) InnoDB Buffer hit rate innodb_buffer_read_hits =) * 100% mysql> show status like 'innodb _ buffer_pool_read % '; (5) Query Cache hit rate: Query_cache_hits = (Qcahce_hits/(Qcache_hits + Qcache_inserts) * 100%; mysql> show status like 'qcache % '; (6) Number of Table Cache statuses mysql> show status like 'open %'; (7) thread Cache hit rate Thread_cache_hits = (1-Threads_created/connections) * 100% mysql> show status like 'thread % '; mysql> show status like 'ons ons'; (8) lock status mysql> show status like '% lock %'; www.2cto.com (9) replication latency mysql> show slave status (10) Tmp Table status (temporary Table status) mysql> show status like 'create _ tmp % '; (11) Binlog Cache Usage mysql> show status like 'binlog _ cache %'; (12) innodb_log_waits mysql> show status like 'innodb _ log_waits ';