如何計算:
從網上檢視如果獲取mysql 的qps,tps 的方法有如下兩種:
方法一 基於 questions 計算qps,基於 com_commit com_rollback 計算tps
questions = show global status like "questions";
uptime = show global status like "uptime";
qps=questions/uptime
com_commit = show global status like "com_commit";
com_rollback = show global status like "com_rollback";
tps=(com_commit + com_rollback)/uptime
如何計算:
從網上檢視如果獲取mysql 的qps,tps 的方法有如下兩種:
方法一 基於 questions 計算qps,基於 com_commit com_rollback 計算tps
questions = show global status like "questions";
uptime = show global status like "uptime";
qps=questions/uptime
com_commit = show global status like "com_commit";
com_rollback = show global status like "com_rollback";
uptime = show global status like "uptime";
tps=(com_commit + com_rollback)/uptime