Skip to content
Scripts and graph generation for TPS and response time from sysbench
Lua Perl R Shell
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
results_list.txt initial checkin Aug 9, 2012


This is a set of simple scripts to kick off various a sysbench tests with a given test numbers. The sysbench results will be stored in a subdir 'res#'. Then the will parse all the results subdirs and generate a PDF with two graphs, one for sysbench TPS and one for sysbench response time where the X axis is time.


Whatever version of sysbench you want. The run.threads shell script currently requires the 'zipf' distribution in sysbench, which is available here and you can learn more about here

The sysbench client is run on the test machine and results are stored there locally.

On the machine you wish to generate graphs on (I do this on my laptop), I get the results data copied over and beyond that I need to have 'R' installed with the 'ggplot2' library. You also need Perl, any version should do, to parse the sysbench data. This could be done in R, but I'm much better at Perl so far.

rough flow

Setup sysbench

  1. install bzr on the test machine
  2. bzr clone your desired sysbench
  3. build sysbench following README instructions, you'll likely need several dependencies to get it working
  4. make install sysbench, or at least get it in your path

Setup test environment

  1. Get mysql installed and configured as you'd like.
  2. Prepare the sbtest database, particularly pay attention to how many tables you need. I'd recommend following the instructions here. Note that a copy of the lua tests are included in this repository.
  3. Adjust run.threads with the parameters you want.

Run test

  1. Be sure mysql is configured as you want for your test run
  2. Document what you are testing for the test run (pick a number for it). See results_list.txt.
  3. Restart mysql so you have a level playing field
  4. run sh run.threads <testnum>. This will kick off a series of queries on your test tables to load them into memory, and then kick off the sysbench.
  5. repeat with all the different variations you want to test

Generate graph data

  1. Copy the res* subdirs to the machine you will generate graphs on (if necessary)
  2. Run This will parse all the results available (into and generate a result_graph.pdf (see example). This can be done repeatedly as your tests are running if you are obsessive-compulsive about seeing how your tests are going.
Something went wrong with that request. Please try again.