MySQL 5.7 Performance Benchmark

NOV 20, 2020 • WRITTEN BY ROMAN AGABEKOV
In this article, we benchmark the performance of MySQL 5.7 default configuration vs. configuration recommended by Releem.
MySQL 5.7 Performance Benchmark
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..

Below you could see the benchmark results for two MySQL configurations and performance improvments.

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.

WRITTEN BY ROMAN AGABEKOV
Ready to dive in?
Try Releem today for FREE! No credit card required.