mysql高性能学习笔记03_MySQL高性能学习笔记

--oltp-dist-type=STRING 分布的随机数{uniform(平均分布),Gaussian(高斯分布),special(空间分布)}。默认是special

--oltp-dist-iter=N 产生数的迭代次数。默认是12

--oltp-dist-res=N ‘special’的百分比值。默认是75

General database options:

--db-ps-mode=STRING编制报表应用模式{auto, disable} [auto]

--max-time=N limit for total execution time in seconds [0] #最大年夜履行时光,单位是s。默认是0,不限制。

Compiled-in database drivers:

--oltp-index-updates=N number of index update [1]mysql - MySQL driver

mysql options:

--mysql-host=[LIST,...] MySQL server host [localhost]

--mysql-port=N MySQL server port [3306]

--mysql-socket=STRING MySQL socket

--mysql-user=STRING MySQL user [sbtest]

--mysql-password=STRING MySQL password []

--mysql-db=STRING MySQL database name [sbtest]

--mysql-table-engine=STRING storage engine to use for the test table {myisam,innodb,bdb,heap,ndbcluster,federated} [innodb]

--mysql-engine-trx=STRING whether storage engine used is transactional or not {yes,no,auto} [auto]

--mysql-ssl=[on|off] use SSL connections, if available in the client library [off]

--myisam-max-rows=N max-rows parameter for MyISAM tables [1000000]

3.测试线程sysbench--test=threads --num-threads=500 --thread-yields=100 --thread-locks=4 run

4.测试IOsysbench--test=oltp --mysql-table-engine=innodb --mysql-host=192.168.X.X --mysql-db=test --oltp-table-size=500000 --mysql-user=root --mysql-password=123456 prepare

ba900ddb3c4ff62b9fb00020b7f89017.png

--num-threads 开启的线程 --file-total-size 总的文件大年夜小

1,prepare阶段,生成须要的测试文件,完成后会在当前目次下生成很多小文件。sysbench--test=fileio --num-threads=16 --file-total-size=2G --file-test-mode=rndrw prepare

下面的敕令运行文件 I/O 混淆随机读/写基准测试:sysbench--test=fileio --file-total-size=3G --file-test-mode=rndrw --max-time=300--max-requests=0 run

Ubuntu体系可以直接apt,如:

bdfc78c37f96f7f6a331b39bca307266.png-wh_651x-s_3513373263.png

履行结不雅:

输出结不雅分析:

每秒请求数是:233.33 Requests/sec

吞吐量是:3.6458Mb/secsysbench--test=fileio --file-total-size=3G cleanup

5.清理测试时生成的文件sysbench--test=fileio --num-threads=20 --file-total-size=2G --file-test-mode=rndrw cleanup

6.测试内存sysbench--test=memory --memory-block-size=8k --memory-total-size=1G run

7.测试mutexsysbench –test=mutex –num-threads=100 –mutex-num=1000 –mutex-locks=100000 –mutex-loops=10000 run

8.测试OLTP

1,prepare阶段,生成须要的测试表sysbench--num-threads=16 --test=oltp --mysql-table-engine=innodb --mysql-host=192.168.x.x --mysql-db=test --oltp-table-size=500000 --mysql-user=root --mysql-password=123456 run

3,清理测试时生成的测试表

2,run阶段sysbench--num-threads=16 --test=oltp --mysql-table-engine=innodb --mysql-host=192.168.x.x --mysql-db=test --oltp-table-size=500000 --mysql-user=root --mysql-password=123456 cleanup

推荐阅读

室外持续高温,王金升正舒畅地在空调房享受着这一消暑时刻,忽然他放在桌子上的手机“滴滴”地响了起来,他经由过程简单的操作,就完成了自家地里的举措措施大年夜棚的┞菲握。>>>详细阅读

地址:http://www.17bianji.com/lsqh/36585.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值