經常用到的mysql性能指標_MySQL
來源:懂視網
責編:小采
時間:2020-11-09 18:05:19
經常用到的mysql性能指標_MySQL
經常用到的mysql性能指標_MySQL:bitsCN.com 經常用到的mysql性能指標 一,獲取mysql用戶下的進程總數ps -ef | awk '{print $1}' | grep mysql | grep -v grep | wc-1二,主機性能狀態# uptime[root@ ~]# uptime 13:05:52 up 53 day
導讀經常用到的mysql性能指標_MySQL:bitsCN.com 經常用到的mysql性能指標 一,獲取mysql用戶下的進程總數ps -ef | awk '{print $1}' | grep mysql | grep -v grep | wc-1二,主機性能狀態# uptime[root@ ~]# uptime 13:05:52 up 53 day

bitsCN.com
經常用到的mysql性能指標 一,獲取mysql用戶下的進程總數ps -ef | awk '{print $1}' | grep "mysql" | grep -v "grep" | wc-1二,主機性能狀態# uptime[root@ ~]# uptime 13:05:52 up 53 days, 52 min, 1 user, load average: 0.00, 0.00, 0.00三,CPU使用率# top或# vmstat四,磁盤IO量# vmstat 或 # iostat 五,swap進出量[內存]# free六,數據庫性能狀態(1)QPS(每秒Query量)QPS = Questions(or Queries) / secondsmysql > show /*50000 global */ status like 'Question';(2)TPS(每秒事務量) TPS = (Com_commit + Com_rollback) / secondsmysql > show status like 'Com_commit';mysql > show status like 'Com_rollback'; (3)key Buffer 命中率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%'; (4)InnoDB Buffer命中率innodb_buffer_read_hits = (1 - innodb_buffer_pool_reads / innodb_buffer_pool_read_requests) * 100%mysql> show status like 'innodb_buffer_pool_read%';(5)Query Cache命中率Query_cache_hits = (Qcahce_hits / (Qcache_hits + Qcache_inserts )) * 100%;mysql> show status like 'Qcache%'; (6)Table Cache狀態量mysql> show status like 'open%';(7)Thread Cache 命中率Thread_cache_hits = (1 - Threads_created / connections ) * 100%mysql> show status like 'Thread%';mysql> show status like 'Connections';(8)鎖定狀態mysql> show status like '%lock%'; (9)復制延時量mysql > show slave status(10) Tmp Table 狀況(臨時表狀況)mysql > show status like 'Create_tmp%';(11) Binlog Cache 使用狀況mysql > show status like 'Binlog_cache%';(12) Innodb_log_waits 量mysql > show status like 'innodb_log_waits'; bitsCN.com
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
經常用到的mysql性能指標_MySQL
經常用到的mysql性能指標_MySQL:bitsCN.com 經常用到的mysql性能指標 一,獲取mysql用戶下的進程總數ps -ef | awk '{print $1}' | grep mysql | grep -v grep | wc-1二,主機性能狀態# uptime[root@ ~]# uptime 13:05:52 up 53 day