SysBench-a kind of system performance Benchmark

Source: Internet
Author: User
Tags benchmark

SysBench is an open-source, cross-platform, modular, and multi-threaded performance testing tool that runs on databases with high load, you can perform performance tests on CPU/memory/thread/IO/database. Used to evaluate the performance parameters of the operating system.

SysBench introduction and use

SysBench 0.4.12 installation and testing

RHEL6 SysBench performance test

Install MySQL stress testing tool SysBench 0.4.12

1 sysbench Introduction
Sysbench allows us to get the system performance overview without using the real complex database benchmark.

Currently, Major supported databases include mysql, Oracle, and postgresql.

The following system performance parameters can be evaluated:

1. Cpu Performance

2. Memory Allocation and transmission speed test

3. mutex Test

4. file I/O performance

5. Thread Scheduling Performance

6. Database Service Performance (OLTP benchmark)

Originally, sysbench mainly compiled benchmark for mysql. But now SysBench will be further extended to support more database backends, distributed benchmarks and third-party plug-in modules.

Sysbench starts threads according to the specified number. Each thread establishes a connection with mysql. Each thread continuously performs transaction operations, opens transactions, and then performs query, update, and insert operations to commit transactions, start a new transaction. All SQL statements only access one table-sbtest, which is created by the sysbench prepare command. The number of records is also specified and created in prepare. When the test ends, a statistical result is displayed, including the number of transactions per second and the average response time;

 

2. Download and install sysbench
1. Download

: Http://sourceforge.net/projects/sysbench/

Sysbench-0.4.8.tar.gz source code. Sysbench-0.4.8.tar.gz compilation failed.

2. Installation

MySQL is supported by default. To test Oracle/PostgreSQL, add the-with-oracle or-with-pgsql parameter to configure.

[Root @ RedHat sysbench-0.4.8] #./configure -- without-mysql

[Root @ RedHat sysbench-0.4.8] # make

[Root @ RedHat sysbench-0.4.8] # make install
 


 

To test mysql, You need to configure the Parameter options:

./Configure

-- With-mysql-connector des =/opt/mysql/include/mysql indicates the mysql header file directory.

-- With-mysql-libs =/opt/mysql/lib/mysql indicates the mysql Module Directory

If the stock lacks libtool, go to ftp://ftp.gnu.org/gnu/libtool/to download it.

 

3. Performance Testing and result analysis
Please refer to sysbench help

[Root @ RedHat sysbench-0.4.8] # sysbench

Missing required command argument.

Usage:

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 [1, 10000]

-- Max-time = N limit for total execution time in seconds [0]

-- Thread-stack-size = SIZE size of stack per thread [32 K]

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

 

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

 

Commands: prepare run cleanup help

 

See 'sysbench -- test = <name> help' for a list of options for each test.

 

[Root @ RedHat sysbench-0.4.8] #
 


Common Parameters

Parameter Name

Parameter description

-- Num-threads = N

The number of threads used for testing. The default value is 1.

-- Max-requests = N

The maximum number of requests. The default value is 10000.

-Max-time = N

Maximum execution time. The default value is 0.

-- Thread-stack-size = SIZE

Stack size of each thread. The default value is 32 KB.

-- Init-rng = [on | off]

Initialize random number generator?

-- Test = STRING

Running Test

-- Debug = [on | off]

Whether to print more debug information

-- Validate = [on | off]

Whether to perform a validity check

-- Help = [on | off]

Print help and exit

Among them, the STRING options in -- test = STRING are:

STRING

Description

Fileio

File IO Test

Cpu

CPU performance test

Memory

Memory Allocation and transmission speed test

Threads

Thread subsystem performance test

Mutex

Mutex performance test

Oltp

Database OLTP Test

  • 1
  • 2
  • 3
  • Next Page

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.