Skip to content

Instantly share code, notes, and snippets.

@wcc526
Created June 22, 2015 13:41
Show Gist options
  • Save wcc526/50a2ab1651d9ccaa0afb to your computer and use it in GitHub Desktop.
Save wcc526/50a2ab1651d9ccaa0afb to your computer and use it in GitHub Desktop.
sysbench 性能测试
sysbench --test=cpu --cpu-max-prime=20000 run
sysbench --test=fileio --num-threads=16 --file-rw-ratio=5 \
--file-total-size=300M --file-test-mode=rndrw prepare
sysbench --test=fileio --num-threads=16 --file-rw-ratio=5 \
--file-total-size=300M --file-test-mode=rndrw run
sysbench --test=memory --num-threads=16 \
--memory-block-size=8192 --memory-total-size=1G run
mysql -u root -p
create database sbtest;
sysbench --test=oltp --oltp-table-size=1000000 \
--mysql-table-engine=innodb --mysql-user=root \
--mysql-socket=/var/run/mysqld/mysqld.sock \
--db-driver=mysql --mysql-password="yourpassword" prepare
sysbench --test=oltp --oltp-table-size=1000000 \
--mysql-table-engine=innodb --mysql-user=root \
--mysql-socket=/var/run/mysqld/mysqld.sock \
--db-driver=mysql --mysql-password="yourpassword" run
# 或者使用
mysql 自带的 mysqlslap
MyBench 和 Super-Smack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment