MySQL performance computing ##################################### ######################################## ##### QPS (Queries Per Second): mysql> show /*! 50000 global */status like 'questions'; mysql> show /*! 50000 global */status like 'querys'; QPS = Questions (or Queries) /Seconds ###################################### ######################################## #### TPS (Transactions Per Second): mysql> show status like 'com _ commit '; mysql> show status like 'com _ rollback '; # For distributed transactions, add the following two variable values: mysql> show status like 'com _ xa_commit '; mysql> show status like 'com _ xa_rollback'; TPS = (Com_commit + Com_rollback) /Seconds ###################################### ######################################## #### Key Buffer (MyISAM Table index Cache): mysql> show status like 'key _ reads'; mysql> show status like 'key _ read_requests'; mysql> show status like 'key _ writes '; mysql> show status like 'key _ write_requests '; Key Buffer Read hit rate = (1-Key_reads/Key_read_requests) * 100% Key Buffer Write hit rate = (1-Key_writes/Key_write_requests) * 100% ###################################### ######################################## #### Innodb Buffer Pool: mysql> show status like 'innodb _ buffer_pool_reads '; mysql> show status like 'innodb _ buffer_pool_read_requests'; Innodb Buffer Pool Read hit rate = (1-Innodb_buffer_pool_reads/second) * 100% mysql> show innodb status \ G ############################### ######################################## ########## Query Cache: mysql> show status like 'qcache _ hits '; mysql> show status like 'qcache _ inserts'; Query Cache hit rate = (Qcache_hits/(Qcache_hits + Qcache_inserts) * 100%; ######################################## ######################################## # Table Cache: mysql> show status like 'open _ tables '; mysql> show status like 'opened _ tables'; Table Cache hit rate = (Open_tables/Opened_tables) * 100% ###################################### ######################################## #### Thread Cache: mysql> show status like 'connections'; mysql> show status like 'threads _ created '; Thread Cache hit rate = (1-Threads_created/connections) * 100% ###################################### ######################################## ###