关于MySQL的TPS和QPS
2017-11-29 15:31
351 查看
TPS - Transactions Per Second(每秒传输的事物处理个数),这是指服务器每秒处理的事务数,支持事务的存储引擎如InnoDB等特有的一个性能指标。
计算方法:
TPS = (COM_COMMIT + COM_ROLLBACK)/UPTIME
use information_schema;
select VARIABLE_VALUE into @num_com from GLOBAL_STATUS where VARIABLE_NAME ='COM_COMMIT';
select VARIABLE_VALUE into @num_roll from GLOBAL_STATUS where VARIABLE_NAME ='COM_ROLLBACK';
select VARIABLE_VALUE into @uptime from GLOBAL_STATUS where VARIABLE_NAME ='UPTIME';
select (@num_com+@num_roll)/@uptime;
QPS - Queries Per Second(每秒查询处理量)同时适用与InnoDB和MyISAM 引擎
计算方法:
QPS=QUESTIONS/UPTIME
use information_schema;
select VARIABLE_VALUE into @num_queries from GLOBAL_STATUS where VARIABLE_NAME ='QUESTIONS';
select VARIABLE_VALUE into @uptime from GLOBAL_STATUS where VARIABLE_NAME ='UPTIME';
select @num_queries/@uptime;
show global status where variable_name in('com_select','com_insert','com_delete','com_update');
show global status where variable_name in('com_commit','com_rollback');
show status like 'uptime';
http://blog.csdn.net/JeffreyNicole/article/details/47451043
计算方法:
TPS = (COM_COMMIT + COM_ROLLBACK)/UPTIME
use information_schema;
select VARIABLE_VALUE into @num_com from GLOBAL_STATUS where VARIABLE_NAME ='COM_COMMIT';
select VARIABLE_VALUE into @num_roll from GLOBAL_STATUS where VARIABLE_NAME ='COM_ROLLBACK';
select VARIABLE_VALUE into @uptime from GLOBAL_STATUS where VARIABLE_NAME ='UPTIME';
select (@num_com+@num_roll)/@uptime;
QPS - Queries Per Second(每秒查询处理量)同时适用与InnoDB和MyISAM 引擎
计算方法:
QPS=QUESTIONS/UPTIME
use information_schema;
select VARIABLE_VALUE into @num_queries from GLOBAL_STATUS where VARIABLE_NAME ='QUESTIONS';
select VARIABLE_VALUE into @uptime from GLOBAL_STATUS where VARIABLE_NAME ='UPTIME';
select @num_queries/@uptime;
show global status where variable_name in('com_select','com_insert','com_delete','com_update');
show global status where variable_name in('com_commit','com_rollback');
show status like 'uptime';
http://blog.csdn.net/JeffreyNicole/article/details/47451043
相关文章推荐
- 关于mysql的 qps tps
- 关于mysql的 qps tps
- 关于MySQL的TPS和QPS
- mysql状态查看 QPS/TPS/缓存命中率查看
- 关于Tps和Qps的个人理解
- mysql计算 TPS,QPS 的方式
- 【MySQL】为什么不要问我DB极限QPS/TPS
- mysql状态查看 QPS/TPS/缓存命中率查看
- Openresty--关于统计qps和tps的思路及代码设计
- mysql状态查看 QPS/TPS/缓存命中率查看
- mysql状态查看 QPS/TPS/缓存命中率查看
- MySQL TPS、QPS、连接数
- MySQL的TPS和QPS 计算方式
- 转载:mysql状态查看 QPS/TPS/缓存命中率查看
- 【MySQL】计算 TPS,QPS 的方式
- mysql状态查看 QPS/TPS/缓存命中率查看
- mysql状态查看 QPS/TPS/缓存命中率查看
- mysql状态查看 QPS/TPS/缓存命中率查看
- 【MySQL】计算 TPS,QPS 的方式
- 利用脚本获取mysql的tps,qps等状态信息