Sysbench is benchmark developed by Alexey Kopytov (software engineer @ MySQL AB)
http://sysbench.sourceforge.net/ and I want to write a short intro about this tool as sysbench is one of software for my everyday use. For example, SUN published their Solaris vs RedHat stuff based on sysbench’s results (Peter and me provided performance consutling for this publishing).
Sysbench has a lot of options and details so my goal is describe common usage of benchmark.
Sysbench allows to test:

  • file I/O performance
  • scheduler performance
  • memory allocation and transfer speed
  • POSIX threads implementation performance
  • database server performance

First four is useful for the platform evalution, for example if you want to compare speed of file I/O and implementation of threads on different servers – I will write about in further notes. Regarding database benchmarks – in 0.4.7 and earlier versions Sysbench supported only predefined set of queries, but that will change in version 0.5 where sysbench is scriptable (Lua http://www.lua.org/ as scripting language) , and you can use your own tables and queries. 0.5 should be realesed soon. Originally Sysbench supported only MySQL, but later Oracle and PostgreSQL (and deviations, e.g EnterpriseDB) were added – it is not clear from Docs page, but it is :). Sysbench uses only a native API, not middle layers like ODBC, that is why list of supported DB is not wide. Other restriction Sysbench can’t be complided on Windows – well you can try and write about your experience. In next notes I’ll write how to setup and perform database benchmarks.

20 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Mihir

How would i go about using sysbench on Windows Server 2003 and SQL Server 2005? Can you provide with sysbench.exe for windows????

Thanks

Peter Zaitsev

I’m afraid it is not supported on Windows.

I heard someone has done the porting to Windows but it would not support SQL Server without addition work anyway.

Mihir

How do we interpret sysbench results?? I was able to port sysbench for windows and am running on a MP platform (4Sockets/8Cores/16Threads).
I am running with following command.

sysbench.exe –test=oltp –oltp-table-size=1000000 –num-threads=32 –max-requests=100000 run

How should I determine number of threads, max requests??

Also, It is possible to drive CPU utlization higher (close to 100%)?
Please help!

Thanks

Peter Zaitsev

Mihir,

You determinate number of threads and max number of requests depending on benchmarking needs. First is concurrency second is a way to restrict length of the rest.

CPU usage should be high on CPU bound workload if Server scales well.

Mihir

Looks like we cannot use max_requests and max_time simultaneously?? Am i right???

Mihir

Hi,
I have ported sysBench for windows environment and seems to work just fine with SQL Server 2005. But on certain occasions i receive follwong primary key violation messages…

ALERT: failed to execute SQL query: INSERT INTO sbtest values(5694934,0,' ','aaaaaaaaaaffffffffffrrrrrrrrrreeeeeeeeeeyyyyyyyyyy'):
FATAL: 23000 [A43] [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint ‘PK__sbtest__7C8480AE’. Cannot insert duplicate key in object ‘dbo.sbtest’.

First i thought my db is corrupt so i build a new db. I still get these errors. Can anybody provide any help?
Thanks,
Mihir

Alexey Kopytov

Hello Mihir,
It is exciting to hear that sysbench can now be run on Windows and even has a driver for SQL Server. Please let me know if you are interested in including this patches into the upstream version.

Regarding the duplicate key error, since this is not directly related to this blog, feel free to contact me directly at [email protected] or in the mailing list [email protected]. Please also provide the exact command line used to start sysbench.

Best regards,
Alexey.

Jon Tackabury

Does anyone know where I can find a copy of the Windows port of Sysbench? This would be extremely helpful for testing.

devi

Hi,

When i use –max-request option there is no deadlock. If i take that of from the sysbench run script, then there occurs deadlock error? what is the hidden info. and i was very new to sysbench

Norton Security

I have been using sysbench for a while on a Pentium 4 running FreeBSD 6.2 and it’s been a great tool providing great performance information when it comes to upgrading hardware components. I noticed that hardware components may have a substantial impact on MySQL’s performance, especially when you choose between genuine and so called “no-name” components.

Sumit

Hi Mihir,
We are keen in running sysbench on windows. Can you help us on that

anonymous

Sun results are biased. They were always damn cheaters.

linuxbass

Questions about sysbench. Need some help with testing.

The fileio tests deliver excellent metrics with different work loads and threads but the oltp tests only creates on table file which tests only performance work load of one single large file with many reads/writes. I am trying to get a more accurate picture of real mysql performance with many tables and .ibd files as this seems to be more realistic. I am testing VMware performance and back end SAN array. I’m seeing about 250 transactions per second with noop scheduler on a RAID1 volume MySQL 5.0.77. x86_64 do you have any suggestions? Thank you.

linuxbass

Also this it is Centos Linux 5.5. thank you

linuxbass

Also this it is Centos Linux 5.5. thank you

linuxbass

Questions about sysbench. Need some help with testing.

The fileio tests deliver excellent metrics with different work loads and threads but the oltp tests only creates on table file which tests only performance work load of one single large file with many reads/writes. I am trying to get a more accurate picture of real mysql performance with many tables and .ibd files as this seems to be more realistic. I am testing VMware performance and back end SAN array. I’m seeing about 250 transactions per second with noop scheduler on a RAID1 volume MySQL 5.0.77. x86_64 do you have any suggestions? Thank you.

Daniel

Hi,

I am keen to run sysbench for windows , having MySQL. Is there any guides to setup this?

Anant

Hi,
Please give me the steps how i can calibrate NAS for mysql workload using sysbench

Anant

i am connecting mysystem with NAS box and tried to run my sysbench executable on NAS for fileio but it gives error such that sh-sysbench can not execute binary file?..even i have seted execute permission also…can any one light on it?