zoukankan      html  css  js  c++  java
  • 关于MySQL的TPS和QPS

    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;


  • 相关阅读:
    css3中的位置移动
    css中伪元素选择器
    css中伪类选择器
    html5之属性选择器
    html5的文本属性
    html5的视频和音频使用
    常用的linux命令
    常见的http状态码
    springboot之安装和启动es
    linux版本的jdk安装
  • 原文地址:https://www.cnblogs.com/lxjshuju/p/6911863.html
Copyright © 2011-2022 走看看