Home Database Mysql Tutorial mysqlslap performance testing tool

mysqlslap performance testing tool

Feb 18, 2017 am 11:03 AM

-- ===================

-- mysqlslap performance testing tool
-- ===================

Common parameters

--concurrency  #代表并发数量,多个可以用逗号隔开。例如:--concurrency=50,200,500
--engines  #代表要测试的引擎,可以有多个,用分隔符隔开。例如:--engines=myisam,innodb,memory
--iterations #代表要在不同并发环境下,各自运行测试多少次。
--auto-generate-sql #代表用mysqlslap工具自己生成的SQL脚本来测试并发压力。
--auto-generate-sql-add-auto-increment  #代表对生成的表自动添加auto_increment列,从5.1.18版本开始,
--auto-generate-sql-load-type  #代表要测试的环境是读操作还是写操作还是两者混合的(read,write,update,mixed)
--number-of-queries  #代表总共要运行多少条查询。
--debug-info  #代表要额外输出CPU以及内存的相关信息。
--number-int-cols  #代表示例表中的INTEGER类型的属性有几个。
--number-char-cols  #代表示例表中的vachar类型的属性有几个。
--create-schema   #代表自定义的测试库名称。
--query  #代表自定义的测试SQL脚本。
Copy after login


# Test the performance of different storage engines at the same time to compare: concurrency 50-100, 1000 queries
-- default

mysqlslap -a --concurrency=50,100 --number-of-queries 1000 --iterations=5 --engine=myisam,innodb --debug-info
mysqlslap -a --concurrency=50,100 --number-of-queries 3000 --iterations=5 --auto-generate-sql
 --auto-generate-sql-add-auto-increment --engine=ndbcluster --debug-info
Copy after login

-- mixed

mysqlslap --defaults-file=/etc/my.cnf  --concurrency=100,200,400 --iterations=1 --number-int-cols=4 --number-char-cols=35 --auto-generate-sql 
--auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=mixed --engine=ndbcluster --number-of-queries=3000000
 --debug-info 
mysqlslap --defaults-file=/etc/my.cnf  --concurrency=500 --iterations=1 --number-int-cols=4 --number-char-cols=35 --auto-generate-sql 
--auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=mixed --engine=ndbcluster --number-of-queries=3000000 --debug-info
Copy after login

-- write

mysqlslap --defaults-file=/etc/my.cnf  --concurrency=500 --iterations=1 --number-int-cols=4 --number-char-cols=35 --auto-generate-sql --auto-generate-sql
-add-autoincrement --auto-generate-sql-load-type=write --engine=ndbcluster --number-of-queries=3000000
 --debug-info 
mysqlslap --defaults-file=/etc/my.cnf  --concurrency=500,600,700,800,900 --iterations=1 --number-int-cols=4 --number-char-cols=35 --auto-generate-sql 
--auto-generate-sql-add-autoincrement --auto-generate-sql-load-type=write --engine=ndbcluster --number-of-queries=3000000
 --debug-info
Copy after login

The above is the content of the mysqlslap performance testing tool. For more related content, please pay attention to the PHP Chinese website (www. php.cn)!


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1252
24
How to use Docker for performance testing and stress testing of containers How to use Docker for performance testing and stress testing of containers Nov 07, 2023 pm 04:53 PM

How to use Docker for container performance testing and stress testing requires specific code examples. Introduction The rise of container virtualization technology has made the deployment and operation of applications more flexible and efficient. One of the most popular tools is Docker. As a lightweight containerization platform, Docker provides a convenient way to package, distribute and run applications, but how to test and evaluate the performance of containers, especially stress testing under high load conditions, It is a question that many people are concerned about. This article will introduce

The difference between performance testing and unit testing in Go language The difference between performance testing and unit testing in Go language May 08, 2024 pm 03:09 PM

Performance tests evaluate an application's performance under different loads, while unit tests verify the correctness of a single unit of code. Performance testing focuses on measuring response time and throughput, while unit testing focuses on function output and code coverage. Performance tests simulate real-world environments with high load and concurrency, while unit tests run under low load and serial conditions. The goal of performance testing is to identify performance bottlenecks and optimize the application, while the goal of unit testing is to ensure code correctness and robustness.

Nginx load balancing performance testing and tuning practice Nginx load balancing performance testing and tuning practice Oct 15, 2023 pm 12:15 PM

Overview of performance testing and tuning practices of Nginx load balancing: As a high-performance reverse proxy server, Nginx is often used in load balancing application scenarios. This article will introduce how to perform performance testing of Nginx load balancing and improve its performance through tuning practices. Performance test preparation: Before performing the performance test, we need to prepare one or more servers with good performance, install Nginx, and configure reverse proxy and load balancing. Test tool selection: In order to simulate real load conditions, we can use common

Red Magic 9 Pro in-depth performance test: it ends the performance competition early Red Magic 9 Pro in-depth performance test: it ends the performance competition early Feb 03, 2024 pm 04:35 PM

It has to be said that in this increasingly homogenized mobile phone market, the Red Magic is indeed a quite unique and unusual existence. While the entire gaming phone category is struggling due to the improved energy consumption ratio of Qualcomm Snapdragon, the Red Devils have always adhered to their own set of product concepts, with a straight body and active heat dissipation, all they want is a performance release. . When the entire industry's flagship mobile phones are becoming more and more slumped due to the constant accumulation of imaging modules, the Red Devils actually gives you a flat rear camera design. This may even be the first trend in the entire mobile phone industry in the past four or five years. The only product on the market. (Source: Red Devils) The most important thing is that, as the master of netizens’ opinions, Red Devils has really succeeded in attracting a group of fans. When the flagship sub-brands of several major manufacturers sell for around 3,000 yuan, this

Java development: How to use JMH for performance testing and benchmarking Java development: How to use JMH for performance testing and benchmarking Sep 20, 2023 pm 02:00 PM

Java development: How to use JMH for performance testing and benchmarking Introduction: During the Java development process, we often need to test the performance and efficiency of the code. In order to accurately evaluate the performance of the code, we can use the JMH (Java Microbenchmark Harness) tool, which is a performance testing and benchmarking tool specially designed for Java developers. This article will introduce how to use JMH for performance testing and benchmarking, and provide some specific code examples. 1. What

Methods of performance testing in Golang function concurrent programming Methods of performance testing in Golang function concurrent programming Apr 17, 2024 pm 10:09 PM

In the Go language, program performance can be improved by making concurrent calls to functions. To evaluate this performance improvement, a benchmarking mechanism can be used: Benchmarking: Measure function execution time using built-in mechanisms such as funcBenchmarkConcurrentFunction. Practical case: For example, perform a concurrent performance test on a function that calculates Fibonacci numbers, such as funcBenchmarkFibonacciConcurrent. Analysis results: Benchmark tests can show the performance improvement of concurrent computing relative to serial computing. For example, Fibonacci number calculation is about 21,311 nanoseconds faster.

Vue development advice: How to perform performance testing and performance tuning Vue development advice: How to perform performance testing and performance tuning Nov 22, 2023 pm 12:01 PM

In Vue development, performance is a very important issue. If we can develop applications with excellent performance, the user experience and market competitiveness will be greatly improved. To achieve this, we need to perform performance testing and performance tuning. This article will introduce how to perform performance testing and performance tuning. 1. Performance testing Performance testing is the key to improving application performance. It can detect the factors causing performance problems in the application and then optimize them. To conduct performance testing, we can adopt the following methods: 1. Benchmark test Benchmark test is

How to perform system tuning and performance testing of Linux systems How to perform system tuning and performance testing of Linux systems Nov 07, 2023 am 11:33 AM

Operating system performance optimization is one of the keys to ensuring efficient system operation. In Linux systems, we can perform performance tuning and testing through various methods to ensure the best performance of the system. This article will introduce how to perform system tuning and performance testing of Linux systems, and provide corresponding specific code examples. 1. System tuning System tuning is to optimize the performance of the system by adjusting various parameters of the system. The following are some common system tuning methods: 1. Modify the kernel parameters. The kernel parameters of the Linux system control the system operation.

See all articles