Skip to content

Instantly share code, notes, and snippets.

@felix021
Created July 27, 2016 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felix021/3039dd8fdcf081a861a80ef0a7a6f2cf to your computer and use it in GitHub Desktop.
Save felix021/3039dd8fdcf081a861a80ef0a7a6f2cf to your computer and use it in GitHub Desktop.
Cloud Database Test
#!/bin/bash
#注:很多发行版自带SysBench的是0.4.12,但有些参数(如oltp-tables-count)是0.5才支持的,建议从官方源获取源码编译运行
cmd="sysbench --test=/root/src/sysbench-0.5/sysbench/tests/db/oltp.lua \
--oltp-table-size=2000000 \
--oltp-tables-count=20 \
--oltp-range-size=100 \
--oltp-point-selects=10 \
--oltp-simple-ranges=6 \
--oltp-sum-ranges=2 \
--oltp-order-ranges=3 \
--oltp-distinct-ranges=2 \
--oltp-index-updates=1 \
--oltp-non-index-updates=1 \
--num-threads=32
--max-requests=0
--max-time=1800
--report-interval=10
--rand-init=on
--rand-type=special
--rand-spec-iter=12
--rand-spec-pct=10
--rand-spec-res=75
--verbosity=3
--mysql-host=10.0.0.1
--mysql-port=3306
--mysql-user=root
--mysql-password=123456
"
$cmd cleanup
$cmd prepare
$cmd run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment