Sysbench Multithreaded Performance Testing tool _mysql

Source: Internet
Author: User
Tags generator lua mutex rand ranges server port
Recently, a lot of performance testing with Sysbench, also summed up its characteristics and usage and need to pay attention to matters. Sysbench is a multithreaded performance testing tool that can perform performance testing such as cpu/memory/io/database. But most of the time I use it to do an OLTP test of the database (MySQL). It can measure which things, how to measure let me answer from its command help.
~/zbs$ Sysbench--help
Missing required command argument.
Usage:
Sysbench [general-options] ...--test=<test-name> [test-options] ... command
The above is the approximate usage,--test= specifies we need to measure what type, then--test what kinds of types? Fileio/cpu/memory/threads/mutex, I'm sorry. I have not tested the previous ones, I mainly use it to test the performance of the database, but why do not have the database this option, This is what I used the latest version 0.5, the biggest difference from the 0.4 version is that it supports multiple table tests, performs real-time print statistics, and supports custom LUA scripts to set test behavior.
compiled-in tests:
Fileio-file I/O test
CPU-CPU Performance Test
Memory-memory Functions Speed Test
Threads-threads Subsystem Performance Test
Mutex-mutex Performance Test
If you use sysbench0.4 you will probably see the following, please note that the OLTP option is used for database testing.
Compiled-in Tests:
Fileio-file I/O test
CPU-CPU Performance Test
Memory-memory Functions Speed Test
Threads-threads Subsystem Performance Test
Mutex-mutex Performance Test
OLTP-OLTP Test
After watching the test mode, what are some of the main other control parameters? First of all, let's say this particular parameter of each test pattern how to erase sysbench--test=<test-mode> help, such as me here (please note that Because the sysbench0.5--test option does not use the OLTP option for the test of the database, but by specifying the LUA script, so use the previous command to not see the following results, so if you want to see it through 0.4, if anyone finds a way to view the OLTP parameters in version 0.5, please let me know. In addition, although the 0.5 is different from the 0.4 version but the parameters are basically kept compatible):
~$ Sysbench--TEST=OLTP Help
Sysbench 0.4.12:multi-threaded System Evaluation Benchmark
OLTP options:
--oltp-test-mode=string test Type to use {SIMPLE,COMPLEX,NONTRX,SP} [complex]
--oltp-reconnect-mode=string Reconnect mode {Session,transaction,query,random} [session]
--oltp-sp-name=string name of store procedure to call in SP test mode []
--oltp-read-only=[on|off] Generate only ' read ' queries (don't modify database) [off]
--oltp-skip-trx=[on|off] Skip begin/commit statements [off]
--oltp-range-size=n range size for range queries [100]
--oltp-point-selects=n number of point selects [10]
--oltp-simple-ranges=n number of simple ranges [1]
--oltp-sum-ranges=n number of sum ranges [1]
--oltp-order-ranges=n number of ordered ranges [1]
--oltp-distinct-ranges=n number of distinct ranges [1]
--oltp-index-updates=n number of index Update [1]
--oltp-non-index-updates=n number of Non-index updates [1]
--oltp-nontrx-mode=string mode for non-transactional test {Select, Update_key, Update_nokey, INSERT, delete} [select]
--oltp-auto-inc=[on|off] whether auto_increment (or equivalent) should is used on ID column [on]
--oltp-connect-delay=n time in microseconds to sleep after connection to database [10000]
--oltp-user-delay-min=n minimum time into microseconds to sleep over each request [0]
--oltp-user-delay-max=n maximum time into microseconds to sleep over each request [0]
--oltp-table-name=string Name of test table [Sbtest]
--oltp-table-size=n number of records in Test table [10000]
--oltp-dist-type=string random numbers distribution {uniform,gaussian,special} [special]
--oltp-dist-iter=n number of iterations used for numbers generation [12]
--oltp-dist-pct=n percentage of values to is treated as ' special ' (for special distribution) [1]
--oltp-dist-res=n percentage of ' special ' values to use (for special distribution) [75]
General Database options:
--db-driver=string Specifies database driver to use ("Help" to get list of available drivers)
--db-ps-mode=string Prepared statements usage mode {auto, disable} [auto]
Compiled-in Database Drivers:
Mysql-mysql Driver
MySQL options:
--mysql-host=[list,...] MySQL server host [localhost]
--mysql-port=n MySQL server port [3306]
--mysql-socket=string MySQL Socket
--mysql-user=string MySQL user [sbtest]
--mysql-password=string mysql Password []
--mysql-db=string MySQL database name [sbtest]
--mysql-table-engine=string storage Engine to use for the test table {myisam,innodb,bdb,heap,ndbcluster,federated} [ InnoDB
--mysql-engine-trx=string whether storage engine used is transactional or not {yes,no,auto} [auto]
--mysql-ssl=[on|off] Use SSL connections, if available into the client library [off]
--myisam-max-rows=n max-rows parameter for MyISAM tables [1000000]
--mysql-create-options=string additional options passed to create TABLE []
There are so many parameters, I believe you can basically understand it, I wait for the example of the time will speak of what the parameters in the meaning. Then you know how to look at the usage of a specific test mode and then look at the general-options, general parameters, see below 0.5 of the parameters (relatively 0.4 increase a lot, some of the names of the parameters also changed, how to distinguish---to explain the exact same parameter):
General Options:
--num-threads=n number of threads to use [1]
--max-requests=n limit for total number of requests [10000]
--max-time=n limit for total execution time in seconds [0]
--forced-shutdown=string amount of time to before--max-time before forcing shutdown [off]
--thread-stack-size=size size of stack per thread [64K]
--tx-rate=n target Transaction rate (TPS) [0]
--report-interval=n periodically intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]
--report-checkpoints=[list,...] Dump full statistics and reset all counters at specified points. The argument is a list of comma-separated values representing the amount of time in seconds elapsed from start of test whe N-Checkpoint (s) must be performed. The checkpoints are off by default. []
--test=string Test to run
--debug=[on|off] Print more debugging info [off]
--validate=[on|off] Perform validation checks where possible [off]
--help=[on|off] Print help and exit
--version=[on|off] Print version and exit [off]
--rand-init=[on|off] Initialize random number generator [off]
--rand-type=string random numbers distribution {uniform,gaussian,special,pareto} [special]
--rand-spec-iter=n number of iterations used for numbers generation [12]
--rand-spec-pct=n percentage of values to is treated as ' special ' (for special distribution) [1]
--rand-spec-res=n percentage of ' special ' values to use (for special distribution) [75]
--rand-seed=n seed for random number generator, ignored when 0 [0]
--rand-pareto-h=n parameter H for Pareto distibution [0.2]

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.