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

Tutorial on installing the unpacked version of mysql5.7 on CentOS 7

1. Unzip the mysql compressed package to the /usr...

Introduction to new ECMAscript object features

Table of contents 1. Object properties 1.1 Attrib...

Implementation idea of ​​left alignment of the last row of flex box layout

Using flex layout, if it is a nine-square grid, i...

HTML code example: detailed explanation of hyperlinks

Hyperlinks are the most frequently used HTML elem...

js to make a simple calculator

This article shares the specific code of making a...

JavaScript code to achieve a simple calendar effect

This article shares the specific code for JavaScr...

Mysql auto-increment primary key id is not processed in this way

Mysql auto-increment primary key id does not incr...

Detailed description of HTML table border control

Only show the top border <table frame=above>...

Summary of the minesweeping project implemented in JS

This article shares the summary of the JS mineswe...

Several commonly used methods for centering CSS boxes (summary)

The first one: Using the CSS position property &l...

MySQL transaction isolation level details

serializable serialization (no problem) Transacti...

How to install JDK and Mysql on Ubuntu 18.04 Linux system

Platform deployment 1. Install JDK step1. Downloa...

Detailed explanation of the functions of each port of Tomcat

From the tomcat configuration file, we can see th...