EmergencyEMERGENCY? Get 24/7 Help Now!

SysBench – benchmark tool

 | August 18, 2006 |  Posted In: Benchmarks

PREVIOUS POST
NEXT POST

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.

PREVIOUS POST
NEXT POST
Vadim Tkachenko

Vadim Tkachenko co-founded Percona in 2006 and serves as its Chief Technology Officer. Vadim leads Percona Labs, which focuses on technology research and performance evaluations of Percona’s and third-party products. Percona Labs designs no-gimmick tests of hardware, filesystems, storage engines, and databases that surpass the standard performance and functionality scenario benchmarks. Vadim’s expertise in LAMP performance and multi-threaded programming help optimize MySQL and InnoDB internals to take full advantage of modern hardware. Oracle Corporation and its predecessors have incorporated Vadim’s source code patches into the mainstream MySQL and InnoDB products. He also co-authored the book High Performance MySQL: Optimization, Backups, and Replication 3rd Edition.

20 Comments

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

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

    Thanks

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

  • 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

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

  • 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

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

  • 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

  • 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

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

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

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

Leave a Reply

 
 

Percona’s widely read Percona Data Performance blog highlights our expertise in enterprise-class software, support, consulting and managed services solutions for both MySQL® and MongoDB® across traditional and cloud-based platforms. The decades of experience represented by our consultants is found daily in numerous and relevant blog posts.

Besides specific database help, the blog also provides notices on upcoming events and webinars.
Want to get weekly updates listing the latest blog posts? Subscribe to our blog now! Submit your email address below and we’ll send you an update every Friday at 1pm ET.

No, thank you. Please do not ask me again.