MySQL 5.7 Performance Benchmark

Roman Agabekov
Releem
Published in
2 min readNov 23, 2020

In this article, we benchmark the performance of MySQL 5.7 default configuration against the configuration recommended by Releem.

For this benchmark we use Sysbench utility and the server with the following configuration:
Operating System: Debian 9; CPU: 2 cores; RAM: 2GB; MySQL version: 5.7

Benchmark was conducted with the following stages:

  1. Prepare database for benchmark using the following command:
sysbench --db-driver=mysql --mysql-user=root --mysql-password='root' --mysql-db=test 
--mysql_storage_engine=innodb --table_size=10000000 --tables=2 --threads=2 /usr/share/sysbench/oltp_read_write.lua prepare

2. Launch test1 (read-only) using the following command:

sysbench --db-driver=mysql --mysql-user=user --mysql-password='password' --mysql-db=test --mysql_storage_engine=innodb --table_size=10000000 --tables=2 --threads=2 --time=60 /usr/share/sysbench/oltp_read_only.lua run

3. Launch test2 (read/write) using the following command:

sysbench --db-driver=mysql --mysql-user=user --mysql-password='password' --mysql-db=test --mysql_storage_engine=innodb --table_size=10000000 --tables=2 --threads=2 --time=60 /usr/share/sysbench/oltp_read_write.lua run

4. Launch Releem Agent and apply recommended MySQL configuration.

5. Launch test1 (read-only) the same as in stage 3.

6. Launch test2 (read/write) the same as in stage 4.

You could see the benchmark results for two MySQL configurations and performance improvments in original post.

Conclusion

The benchmark results reveal that the recommended configuration delivered a 30% boost to MySQL performance compared to the default configuration. In just 1 minute we got the optimized MySQL configuration, which helped us to get a significant performance boost, not only on read workloads but also on a high read/write workload.

Originally published on releem.com.

--

--

Roman Agabekov
Releem
Editor for

Founder at Releem - MySQL Performance Management tool for Developers | Software Engineer