首页 > 数据库 >mysql benchmark

mysql benchmark

时间:2022-11-13 23:35:59浏览次数:61  
标签:-- benchmark db oltp mysql test sysbench

数据库创建用户密码数据库,字段值均为 benchmark。
安装sysbench,执行命令。
测试结果:

#u-ubuntu-vm 
export MYSQL_HOST=192.168.1.10 
# 准备数据
sysbench --db-driver=mysql --time=300 --threads=10 --report-interval=1 --mysql-host=$MYSQL_HOST --mysql-port=16033 --mysql-user=benchmark --mysql-password=benchmark  --mysql-db=benchmark --tables=20 --table_size=1000000 oltp_read_write --db-ps-mode=disable prepare
# 读写
sysbench --db-driver=mysql --time=30 --threads=10 --report-interval=1 --mysql-host=$MYSQL_HOST  --mysql-port=16033 --mysql-user=benchmark --mysql-password=benchmark  --mysql-db=benchmark --tables=20 --table_size=1000000 oltp_read_write --db-ps-mode=disable run
# 只读
sysbench --db-driver=mysql --time=30 --threads=10 --report-interval=1 --mysql-host=$MYSQL_HOST  --mysql-port=16033 --mysql-user=benchmark --mysql-password=benchmark  --mysql-db=benchmark --tables=20 --table_size=1000000 oltp_read_only --db-ps-mode=disable run


SQL statistics:
    queries performed:
        read:                            61530
        write:                           17580
        other:                           8790
        total:                           87900
    transactions:                        4395   (146.23 per sec.)
    queries:                             87900  (2924.61 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          30.0540s
    total number of events:              4395

Latency (ms):
         min:                                   14.80
         avg:                                   68.31
         max:                                  403.70
         95th percentile:                      150.29
         sum:                               300219.90

Threads fairness:
    events (avg/stddev):           439.5000/7.17
    execution time (avg/stddev):   30.0220/0.02

Clipped from: https://segmentfault.com/a/1190000038731788

标签:--,benchmark,db,oltp,mysql,test,sysbench
From: https://www.cnblogs.com/svji/p/16887681.html

相关文章

  • MySQL高级6【MVCC-其他日志-主从复制-备份与恢复】尚硅谷
    【第16章多版本并发控制】1.什么是MVCCMVCC(MultiversionConcurrencyControl),多版本并发控制。顾名思义,MVCC是通过数据行的多个版本管理来实现数据库的并发控制。这......
  • Ubuntu 20.04 安装部署 MySQL 8.0
    1.规划官网:MySQL社区官网,下载包需要创建oracle账户,本地使用的是Linux通用的二进制包mysql-8.0.31-linux-glibc2.12-x86_64.tarmd5:89e902edeb75216c366e878f3c9e85be......
  • MySQL优化
    一、       MySQL数据库-SQL优化MySQLDBMS-MySQLDatabaseManagementSystem。数据库管理系统。1       结构图   2       MySQL......
  • 使用MySQL时出现The server time zone value '�й���׼ʱ��' is unrecogni的解决方法
    问题:Causedby:com.mysql.cj.exceptions.InvalidConnectionAttributeException:Theservertimezonevalue'�й���׼ʱ��'isunrecognizedorrepresentsmorethanoneti......
  • MySQL数据库连接参数
    数据库连接参数driver-class-name:com.mysql.cj.jdbc.Driver//&serverTimezone=GMT%2B8连接使用的时区,一般是MySQL8+版本使用的url:jdbc:mysql://localhost:3306/......
  • MySQL
     MySQL是一个关系型数据库管理系统,由瑞典MySQLAB公司开发,目前属于Oracle公司。MySQL是一种关联数据库管理系统,关联数据库将数据保存在不同的表中,而不是将所有数据......
  • Centos7 Mysql 双机热备实现数据库高可用
    mysql双主热备,也称主主互备,目的是mysql数据库高可用,只支持双机,原因是mysql的复制是一主多从,但一个从服务器只能有一个主服务器。双机热备的条件是双机mysql版本必须一致。服......
  • MySQL 联合索引、复合索引
    复合索引也叫联合索引,经常使用,遇到问题,可以看下这3篇文章:1. https://www.jb51.net/article/229580.htm2.https://blog.csdn.net/CSDN_LGY_Java/article/details/11159......
  • mysql 索引优化 explain,复合索引,联合索引
    本节是关于MySQL的复合索引相关的知识,两个或更多个列上的索引被称作复合索引,本文主要介绍了mysql联合索引生效的条件及失效的条件,感兴趣的可以了解一下:必须用实例说话:先......
  • mysql-最常用SQL语句大全
    DDL(DataDefinitionLanguage)数据定义语言一、操作库 --创建库createdatabasedb1;--创建库是否存在,不存在则创建createdatabaseifnotexists/ɪɡˈzɪsts......