What Is Sysbench?
Sysbench is a modular, cross-platform and multi-threaded benchmark tool for evaluating OS parameters that are important for a system running a database 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.
Features:
Current features allow to test the following system parameters:
- File I/O performance
- Scheduler performance
- Memory allocation and transfer speed
- POSIX threads implementation perforsemance
- Database server performance
Installation:
1.For installing sysbench on windows you need to download the sysbench github repository
( download from https://github.com/akopytov/sysbench)
2.CMake (download from http://www.cmake.org).
3.Visual Studio Community 2015 (download from https://www.visualstudio.com/vs/community/ )
4.Download MYSQL server (download from https://dev.mysql.com/downloads/mysql/)
How To Build On Windows:
1.Open the command prompt (cmd.exe) and go to the downloaded sysbench directory.
2.To Build with MYSQL Support,you will need mysql.h header file and client library libmysqld.lib
You can get them from downloading the mysql server package and unpacking the "zip" distribution .
Append Directory where mysql.h is located to the environment variable INCLUDE,
eg: set INCLUDE=%INCLUDE%;C:\Program Files\MySQL\MySQL Server 5.7\include
Append Directory where libmysql.lib is located to the environment variable LIB,
eg: set LIB=%LIB%;C:\Program Files\MySQL\MySQL Server 5.7\lib ![]() |
SET THE PATH IN ENVIRONMENT VARIABLE |
3.In the sysbench directory execute the cmake command
cmake -G "Visual Studio 14 2015"
This depends on what version or packages of VS are installedon your PC.
4.Once the cmake command is executed a solution file of sysbench (sysbench.sln) is generated in the sysbench directory .
5Open the .sln file in Visual Studio.For this you need to install RelwithDebInfo Package (download from http://www.rtl-sdr.com/manual-installation-of-sdr/)
![]() |
Alternatively,from the command line,issue
vcbuild /useenv sysbench.sln "RelWithDebInfo|Win32"
Once the sysbench.exe file is generated you can use the tool for benchmarking by calculating all the parameters
You can use the following commands :
CPU Benchmark - sysbench.exe --test=cpu --cpu-max-prime=20000 run
File IO Benchmark - sysbench.exe --test=fileio --file-total-size=150G prepare
sysbench.exe --test=fileio --file-total-size=150G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run
Memory - sysbench.exe --test=memory --num-threads=4 run
For Eg: