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 generate_graph.sh 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.
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.
- install bzr on the test machine
- bzr clone your desired sysbench
- build sysbench following README instructions, you'll likely need several dependencies to get it working
- make install sysbench, or at least get it in your path
Setup test environment
- Get mysql installed and configured as you'd like.
- 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.
- Adjust run.threads with the parameters you want.
- Be sure mysql is configured as you want for your test run
- Document what you are testing for the test run (pick a number for it). See results_list.txt.
- Restart mysql so you have a level playing field
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.
- repeat with all the different variations you want to test
Generate graph data
- Copy the res* subdirs to the machine you will generate graphs on (if necessary)
generate_graph.sh. This will parse all the results available (into
all_res.data) 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.