GIT – If you want to test , you can think about SysBench. SysBench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a under intensive load.

The idea of this benchmark suite is to quickly get an impression about system performance without setting up complex database benchmarks or even without installing a database at all.

Current features allow to test the following system parameters:

* I/O performance
* scheduler performance
* memory allocation and transfer speed
* POSIX threads implementation performance
* database server performance (OLTP benchmark)
(Primarily written for server benchmarking, SysBench will be further extended to support multiple database backends, distributed benchmarks and third-party plug-in modules)

I couldn’t find so here are few tips how to it manually.

Download Sysbench (current version is 0.4.12)

# wget

Then unpack it and install with

# tar -xvzf sysbench-0.4.12.tar.gz
# cd sysbench-0.4.12
# libtoolize --force --copy 
# ./
# ./configure
# make
# make install

To test performance you can try

# sysbench --test=cpu --cpu-max-prime=20000 run

For MySQL test, you’ll need to prepare database for testing with

# sysbench --test=oltp --mysql-table-engine=innodb --oltp-table-size=500000 
--mysql-user=test_database --mysql-=test_database_ 
--mysql-socket=/var/lib/mysql/mysql.sock prepare

(replace test_database with valid username and test_database_password with valid password)

This command will create sample table inside test_database and it will have 500 000 rows (InnoDB engine).

sysbench 0.4.12:  multi-threaded system evaluation benchmark

No DB drivers specified, using mysql
Creating table 'test-database'...
Creating 500000 records in table 'test-database'...

Now to start read test

# sysbench --num-threads=16 --max-requests=100000 --test=oltp --oltp-table-size=500000 --mysql-socket=/var/lib/mysql/mysql.sock --oltp-read-only --mysql-user=test_database --mysql-password=test_database_password run

For read-write test you can try

# sysbench --num-threads=16 --max-requests=10000 --test=oltp --oltp-table-size=500000 --mysql-socket=/var/lib/mysql/mysql.sock --oltp-test-mode=complex --mysql-user=test_database --mysql-password=test_database_password run

More info about specific parameters can be found in official docs (

Print Friendly, PDF & Email



Bài viết liên quan