关于MySQL的TPS和QPS
2024-09-30 15:06:16
TPS - Transactions Per Second(每秒传输的事物处理个数),这是指server每秒处理的事务数,支持事务的存储引擎如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;
最新文章
- java读写file
- .NET Lambda
- yii模块下面的组件
- 利用JSDOC快速生成注释文档,非常棒。
- C#串口通信—传输文件测试
- MAC下反編譯安卓APK
- flst与fitem命令是这么用的
- 约跑APP测试报告
- C# WebApi传参之Get请求-AJAX
- android 学习随笔十六(广播 )
- UML学习(二)-----类图
- TPL异步并行编程之取消任务
- Redhat 6.3中syslog信息丢失
- Android的主线程和子线程
- 阿里舆情︱舆情热词分析架构简述(Demo学习)
- Tomcat设计模式
- postman上传图片时已经添加cookie,但仍显示未登陆
- 【mybatis源码学习】mybtias扩展点
- IntelliJ IDEA 2016.2 注册破解激活教程
- Interpreting /proc/meminfo and free output for Red Hat Enterprise Linux 5, 6 and 7
热门文章
- mysql5.7配置
- Django:调用css、image、js
- phpize Cannot find autoconf. 错误解决
- 【HIHOCODER 1052 】基因工程(贪心)
- POJ 3659 Cell phone Network (树的最小点覆盖, 树形DP)
- python基础——4(数字、字符串、列表类型的内置方法介绍)
- openstack创建虚拟机之后使用ssh登陆的解决办法
- XTUOJ 15503 - C
- POJ 2420 A Star not a Tree?【爬山法】
- Eclipse安装插件长时间停留在calculating requirements and dependencies