MySQL Benchmark test

Source: Internet
Author: User
Tags mutex

MySQL Benchmark test tool

Mysqlslap, Sysbench, Super Smack

Mysqlslap's use of the MySQL website gives an introduction

Super Smack is a powerful tool for server stress testing

Sysbench is the MySQL benchmark tool.

Sysbench Installation

Direct Yum Installation

Test environment

Mysql> SELECT VERSION (); +-----------+| VERSION () |+-----------+| 5.1.73    |+-----------+1 row in Set (0.00 sec)

  

1: Test CPU

[Email protected] ~]# sysbench--test=cpu--cpu-max-prime=1500 Run

2: Test FileIO

Generate files first for testing (default 128 16M total 2G files generated)

[Email protected] ~]# Sysbench--test=fileio Prepare

Read-write file test

[Email protected] ~]# sysbench--test=fileio--FILE-TEST-MODE=RNDRW Run

Requests per second: Requests/sec 1841.10

Overall throughput: 28.767mb/sec

To delete test data:

[Email protected] ~]# sysbench--test=fileio cleanup

  

3: Test OLTP (primarily used to test multi-threaded transactions)

Create a database and a test table first

mysql> CREATE DATABASE Gechong; Query OK, 1 row Affected (0.00 sec) mysql> CREATE TABLE TEST_OLTP,    SELECT * from Mysql.user; ERROR 1046 (3d000): No database selectedmysql> use gechong;database changedmysql> CREATE TABLE TEST_OLTP SELECT * FR OM Mysql.user; Query OK, 3 rows affected (0.01 sec) records:3  duplicates:0  warnings:0

  

[Email protected] ~]# sysbench--TEST=OLTP--oltp-table-size=2000000--OLTP-TABLE-NAME=TEST_OLTP--mysql-db=gechong- -mysql-user=root  --msyql-password=gechong prepareunknown option:--msyql-password.

  

The hint creation failed.

See Help below

Sysbench [general-options] ...--test=<test-name> [test-options] ... command

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 wait after--max-time before forcing shutdown [off]
--thread-stack-size=size size of stack per thread [32K]
--init-rng=[on|off] Initialize random number generator [off]
--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

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

Command

Prepare/run/cleanup/help/version

View Help

[Email protected] ~]# sysbench--help=on--test=<oltp> Help

  

MySQL Benchmark 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.