Search This Blog

Sunday, November 18, 2018

MySQL Benchmark by sysbench

To measure MySQL performance, we first create a test table in the database test with 1,000,000 rows of data:

sysbench --test=oltp --oltp-table-size=1000000 --db-driver=mysql --mysql-db=test --mysql-user=root --mysql-password=pass prepare


Then you can run the MySQL benchmark as follows:

sysbench --test=oltp --oltp-table-size=1000000 --db-driver=mysql --mysql-db=test --mysql-user=root --mysql-password=pass --max-time=60 --oltp-read-only=on --max-requests=0 --num-threads=8 run