November 23, 2014

SysBench – benchmark tool

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.

About Vadim Tkachenko

Vadim leads Percona's development group, which produces Percona Clould Tools, the Percona Server, Percona XraDB Cluster and Percona XtraBackup. He is an expert in solid-state storage, and has helped many hardware and software providers succeed in the MySQL market.

Comments

  1. linuxbass says:

    Also this it is Centos Linux 5.5. thank you

  2. linuxbass says:

    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.

  3. Mihir says:

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

    Thanks

  4. peter says:

    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.

  5. Mihir says:

    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

  6. peter says:

    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.

  7. Mihir says:

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

  8. Mihir says:

    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

  9. Alexey Kopytov says:

    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 kaamos@users.sourceforge.net or in the mailing list sysbench-general@lists.sourceforge.net. Please also provide the exact command line used to start sysbench.

    Best regards,
    Alexey.

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

  11. Vadim says:

    Jon,

    You should contact author of sysbench
    at kaamos@users.sourceforge.net

    There was a port to windows but I do not know current status of

  12. devi says:

    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

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

  14. Sumit says:

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

  15. anonymous says:

    Sun results are biased. They were always damn cheaters.

  16. linuxbass says:

    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.

  17. linuxbass says:

    Also this it is Centos Linux 5.5. thank you

  18. Daniel says:

    Hi,

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

  19. Anant says:

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

  20. Anant says:

    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?

Speak Your Mind

*