MySQL mysqlslap pressure test

Source: Internet
Author: User
Tags auth

Introduction

The Mysqlslap is a performance-measuring tool that comes with MySQL, and the mysqlslap is designed to be used as a test tool for testing your own data. Mysqlslap's report is relatively simple, mainly reflected in the implementation of the time, there is no sysbench like TPS, QPS and so on more detailed include.

Parameters
--auto-generate-sql-a automatically generate MySQL test statements--auto-generate-sql-add-AutoIncrement adding auto_increment fields--auto-generate-sql-execute-number=# Number of queries--auto-generate-sql-guid-Primary Adding a GUID field--auto-generate-sql-load-type=name mixed: Mixed, update: Update, write: Writing, key: Read primary KEY and read: query--auto-generate-sql-secondary-indexes=# Set the number of indexed fields--auto-generate-sql-unique-query-number=# Generate n different query SQL statements--auto-generate-sql-unique-write-number=# Generate n different write SQL statements--auto-generate-sql-write-number=# Number of write SQL statements per thread--commit=# Set each number of SQL statements to be submitted once--compress-C enable the compression protocol--concurrency=#-c Number of clients (concurrent volume)--create=name test SQL statement or file--create-schema=Name test Data name--csv=name production CSV format data file--debug-# Write debug log (Windows is not available) such as: Mysqlslap-a-#"D:t:o,c:/debug.txt"--debug-print debugging information after a check test (Windows is not available)--debug-info-T print memory and CPU related information--default-auth=Plugin Verification Plugin--DELIMITER=STR-The F statement delimiter is default;--detach=# Break the heavy connection after executing n statements--enable-cleartext-plugin enable plaintext authentication plug-in--ENGINE=ENGINE_NAME-E test engine such as: MYSQLSLAP-E"MyISAM"Or-E"Myisam,innodb"--Help Information--host=host_name-H Database Host--iterations=#-I repeat the number of runs--login-path=Name Login config file--no-do not delete schema after drop test--number-Char-cols=#-x Set varchar Type field number--number-int-cols=#-y set int type field number--number-of-queries=# Number of SQL statements per client run--ONLY-PRINT displays only the SQL statements that will be run--delimiter option Impact--password=password-p Database Password--Pipe Enable piping--plugin-dir=path plug-in directory--port=port_num-P Database Port--post-query=The SQL statement executed after the value test--post-system=system statements executed after STR test--pre-query=the SQL statement executed before the value test--pre-system=system statements executed before the STR test--protocol=type link protocol TCP, socket, pipe--QUERY=VALUE-Q test SQL statements such as: Mysqlslap--query="SELECT * from T1"--secure-auth do not send password to server--silent-s does not display test (mute test)--socket=path-S socket for connecting to the server--ssl-ca=file_name--ssl-capath=Dir_name--ssl-cert=file_name--ssl-cipher=cipher_list--ssl-crl=file_name--ssl-crlpath=Dir_name--ssl-key=file_name--ssl-verify-server-cert--user=user_name-u database user name--verbose-v output More information--version-v Version Information
Cases

1. Test 100, 200, 400 concurrent execution 10w SQL respectively.

mysqlslap-uroot-proot-h192.168.10.43-p3306--create-schema=chenmh--delimiter="; " --query="callpro_auto_select_pri"  --concurrency=,200 , --number-of-queries=100000

Note: The time of the report output is mainly reflected in the time spent executing the query specified by--number-of-queries, which is 100 concurrent, 200 concurrent, and 400 concurrent 10w call execution time. By default,--iterations does not specify that a repeat operation is performed, if the time to repeat n this output is also the time spent in a single cycle.

2. Generate CSV

Mysqlslap-a-E "myisam,innodb" --csv="c:/a.csv "

Summary

Mysqlslap is mainly for database performance testing, and the automatic test function is limited, and the production report is not detailed enough, so it is recommended to use the Sysbench to do benchmark testing.

Note:

pursuer.chen

Blog:http://www.cnblogs.com/chenmh

This site all the essays are original, welcome to reprint, but reprint must indicate the source of the article, and at the beginning of the article clearly give the link.

Welcome to the exchange of discussions

MySQL mysqlslap pressure test

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.