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 Article Tags

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)

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 performance testing and stress testing of containers

How to implement MySQL underlying optimization: Advanced use and analysis of performance testing and tuning tools How to implement MySQL underlying optimization: Advanced use and analysis of performance testing and tuning tools Nov 08, 2023 pm 03:27 PM

How to implement MySQL underlying optimization: Advanced use and analysis of performance testing and tuning tools

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

Nginx load balancing performance testing and tuning practice

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

The difference between performance testing and unit testing in Go language

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

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

Vue development advice: How to perform performance testing and performance tuning

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

Red Magic 9 Pro in-depth performance test: it ends the performance competition early

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

How to perform system tuning and performance testing of Linux systems

See all articles