mysql狀態檢視 QPSTPS快取命中率檢視
執行中的mysql狀態檢視
對正在執行的mysql進行監控,其中一個方式就是檢視mysql執行狀態。
(1)QPS(每秒Query量)
QPS = Questions(or Queries) / seconds
mysql > show global status like 'Question%';
(2)TPS(每秒事務量)
TPS = (Com_commit + Com_rollback) / seconds
mysql > show global status like 'Com_commit';
mysql > show global status like 'Com_rollback';
(3)key Buffer 命中率
mysql>show global status like 'key%';
key_buffer_read_hits = (1-key_reads / key_read_requests) * 100%
key_buffer_write_hits = (1-key_writes / key_write_requests) * 100%
(4)InnoDB Buffer命中率
mysql> show status like 'innodb_buffer_pool_read%';
innodb_buffer_read_hits = (1 - innodb_buffer_pool_reads / innodb_buffer_pool_read_requests) * 100%
(5)Query Cache命中率
mysql> show status like 'Qcache%';
Query_cache_hits = (Qcahce_hits / (Qcache_hits + Qcache_inserts )) * 100%;
(6)Table Cache狀態量
mysql> show global status like 'open%';
比較 open_tables 與 opend_tables 值
(7)Thread Cache 命中率
mysql> show global status like 'Thread%';
mysql> show global status like 'Connections';
Thread_cache_hits = (1 - Threads_created / connections ) * 100%
(8)鎖定狀態
mysql> show global status like '%lock%';
Table_locks_waited/Table_locks_immediate=0.3% 如果這個比值比較大的話,說明表鎖造成的阻塞比較嚴重
Innodb_row_lock_waits innodb行鎖,太大可能是間隙鎖造成的
(9)複製延時量
mysql > show slave status
檢視延時時間
(10) Tmp Table 狀況(臨時表狀況)
mysql > show status like 'Create_tmp%';
Created_tmp_disk_tables/Created_tmp_tables比值最好不要超過10%,如果Created_tmp_tables值比較大,
可能是排序句子過多或者是連線句子不夠最佳化
(11) Binlog Cache 使用狀況
mysql > show status like 'Binlog_cache%';
如果Binlog_cache_disk_use值不為0 ,可能需要調大 binlog_cache_size大小
(12) Innodb_log_waits 量
mysql > show status like 'innodb_log_waits';
Innodb_log_waits值不等於0的話,表明 innodb log buffer 因為空間不足而等待
比如命令:
>#show global status;
雖然可以使用:
>#show global status like %...%;
來過濾,但是對應長長的list,每一項都代表什麼意思,還是有必要弄清楚。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28686045/viewspace-2135505/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql狀態檢視 QPS/TPS/快取命中率檢視MySql快取
- mysql檢視緩衝池命中率MySql
- mysql檢視主從同步狀態的方法MySql主從同步
- 檢視BW執行狀態
- 檢視看防火牆狀態防火牆
- 檢視mysql執行狀態的一些sqlMySql
- MySQL 變數及效能狀態檢視知識技巧MySql變數
- 系統狀態檢視工具Sysstat
- MySQL資料庫檢視:檢視定義、建立檢視、修改檢視MySql資料庫
- Oracle檢視:常用動態效能檢視Oracle
- 使用 telescope 檢視 schedule 執行狀態
- 系統狀態統計和檢視
- 檢視映象資料庫的狀態資料庫
- linux perl 檢視檔案狀態Linux
- 系統狀態檢視工具systat(轉)
- MYSQL 檢視MySql
- Mysql檢視:MySql
- mysql 優化:使用show status檢視MySQL伺服器狀態資訊MySql優化伺服器
- 4.2.7 檢視元件狀元件
- Linux 檢視網路連線狀態Linux
- Solaris之檢視執行系統狀態
- 【主機】檢視伺服器埠狀態伺服器
- OracleRAC管理 之 叢集狀態&資訊檢視Oracle
- 檢查asm磁碟組狀態的檢視v$asm_diskgroupASM
- 如何檢視hands on的狀態以及督促oracle儘快完成hands on的稽核Oracle
- MySQL 建立檢視MySql
- Mysql檢視程式MySql
- Mysql版本檢視MySql
- mysql 檢視索引MySql索引
- MySQL View 檢視MySqlView
- MySQL進階實戰6,快取表、檢視、計數器表MySql快取
- Linux下用netstat檢視網路狀態、埠狀態Linux
- 檢視資料字典快取(或行快取)的丟失率快取
- 通過Python檢視Azure VM的狀態Python
- 轉OracleRAC管理 之 叢集狀態&資訊檢視Oracle
- 檢視 SELinux狀態及關閉SELinuxLinux
- 如何檢視資料庫當前的狀態?資料庫
- 轉 OracleRAC管理 之 叢集狀態&資訊檢視Oracle