MySQL database implements OLTP benchmark test based on sysbench

MySQL database implements OLTP benchmark test based on sysbench

Sysbench is an excellent benchmark tool that can accurately simulate the disk I/O mode of the MySQL database storage engine InnoDB. Therefore, based on this feature of sysbench, we will use this tool to benchmark and verify the MySQL database's support for simple to complex transaction processing workloads.

Test scenario 1: OLTP read benchmark test

1) Prepare the data

sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=100000

--mysql-db=cbusdb --mysql-user=root prepare

2) OLTP random read consistency business scenario test verification

time sysbench --test=oltp --oltp-table-size=100000 --mysql-db=cbusdb

--mysql-user=root --max-time=60 --oltp-read-only --max-requests=0 --num-threads=8 run

The above test simulates 8 concurrent threads, with a maximum request of 10,000 times/second, and performs random read operations on a single table data set with 100,000 data records for 60 seconds. The test results are as follows:

By simulating 8 concurrent users performing consistent read operations on a table with 100,000 data records and combining the above figure, we can draw the following conclusions:

1) A total of 766,094 read requests, 109,442 update and other types of requests were executed within 60 seconds, and QPS: 12,765;

2) A total of 54721 transaction operations were executed within 60 seconds, TPS: 911, and the success rate was 100%;

3) The minimum execution time of each transaction is 2.98ms, the maximum execution time is 184.5ms, and the average execution time is 8.76ms.

The basic configuration information of the operating environment of the above test results is:

1) The virtual machine has 2 CPUs, 2G memory, and 20G storage space;

2) The MySQL database parameters are not optimized or adjusted.

Test scenario 2: OLTP mixed type load test

Simulate OLTP random read and write (update, delete, insert):

sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=10000

--mysql-db=cbusdb --mysql-user=root --max-time=60

--oltp-nontrx-mode=update_key --max-requests=0 --num-threads=8 run

The test results are as follows:

By simulating 8 concurrent users to simulate a complex mixed workload test on a table with 100,000 data records and combining it with the above figure, the following conclusions are drawn:

1) Within 60 seconds, a total of 233,268 read requests, 83,260 write requests, 33,309 other types of requests, and 5,273 QPS;

2) A total of 16,647 transaction operations were executed within 60 seconds, TPS: 277, the number of deadlocks caused by lock conflicts was 15, and the transaction success rate was 99.91%;

3) The minimum execution time of each transaction is 8.19ms, the maximum execution time is 1299.78ms, and the average execution time is 28.82ms.

The basic configuration information of the operating environment of the above test results is:

1) The virtual machine has 2 CPUs, 2G memory, and 20G storage space;

2) The MySQL database parameters are not optimized or adjusted.

sysbench detailed introduction

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Analysis of Sysbench's benchmarking process for MySQL
  • Method for implementing performance testing of MySQL database through sysbench tool
  • Detailed tutorial on sysbench stress testing of mysql
  • Detailed tutorial on using sysbench to test MySQL performance
  • Tutorial on using sysbench to test MySQL performance
  • Introduction to the use of MySQL performance stress benchmark tool sysbench

<<:  Tutorial on using hyperlink tags in XHTML

>>:  How to run postgreSQL with docker

Recommend

How to avoid data loop conflicts when MySQL is configured with dual masters

I wonder if you have ever thought about this ques...

Vue uses OSS to upload pictures or attachments

Use OSS to upload pictures or attachments in vue ...

CSS3 sample code to achieve element arc motion

How to use CSS to control the arc movement of ele...

How to correctly modify the ROOT password in MySql8.0 and above versions

Deployment environment: Installation version red ...

Introduction to Spark and comparison with Hadoop

Table of contents 1. Spark vs. Hadoop 1.1 Disadva...

Multiple ways to insert SVG into HTML pages

SVG (Scalable Vector Graphics) is an image format...

How to use node to implement static file caching

Table of contents cache Cache location classifica...

Troubleshooting MySQL high CPU load issues

High CPU load caused by MySQL This afternoon, I d...

In-depth understanding of MySQL self-connection and join association

1. MySQL self-connection MySQL sometimes needs to...

Basic introductory tutorial on MySQL partition tables

Preface In a recent project, we need to save a la...

Mysql master-slave synchronization Last_IO_Errno:1236 error solution

What is the reason for the Last_IO_Errno:1236 err...

A brief analysis of Vue's asynchronous update of DOM

Table of contents The principle of Vue asynchrono...