A new benchmark tool is available here to enable automated
benchmark runs of DBT2, Sysbench and flexAsynch using MySQL
and MySQL Cluster.
The benchmark tool is based on dbt2-0.37 for DBT2,
sysbench-0.4.12
for sysbench benchmarks and a flexAsynch program that is
available in
MySQL Cluster source releases (the version needed for the
automated
flexAsynch tests requires an updated version of flexAsynch.cpp
which
hasn't been included in a MySQL Cluster release yet, a blog
post
notifying when it arrives will be written).
The automation scripts are part of the dbt2-0.37.50.tar.gz
package.
This package is needed to run all benchmarks. In addition a
gzipped
source or binary tarball of MySQL or MySQL Cluster is required
to
run the benchmarks. Finally to run sysbench benchmarks one also
needs
to download the sysbench-0.4.12.5 tarball.
So assuming you have downloaded all those tarballs, how does
one
run a sysbench benchmark on your local machine?
The first step is to create a benchmark directory, I usually
use
$HOME/bench or /data1/bench. In this directory create a
directory
tarballs. Place all three tarballs in this directory. Go into
this
directory and unpack the dbt2 tarball through tar xfz
dbt2-0.37.50.tar.gz.
Then copy the benchmark start script into the $HOME/bench
directory
through the command:
cp $HOME/bench/tarballs/dbt2-0.37.50/scripts/bench_prepare.sh
$HOME/bench/.
Then copy the example configuration file in the same manner using
the
command:
cp $HOME/bench/dbt2-0.37.50/examples/autobench.conf
$HOME/bench/.
Edit the autobench.conf to be conformant to your file system
environment.
The example configuration file assumes the use of /data1/bench as
the
directory to use.
Now it is time to prepare to run a benchmark, create a directory
under
$HOME/bench for the test run. So for example if you want to call
it
test_sysbench then run the command:
mkdir $HOME/bench/test_sysbench
Next step is to copy the autobench.conf file into this directory
and
edit it.
cd $HOME/bench
cp autobench.conf test_sysbench/.
Now there are two way to go about editing this configuration
file. If
you want to go fast and unsafe, then go ahead and edit the
file
directly, there is a fair amount of explanations of the
various
parameters in this file. If you want more help, then read
the
dbt2-0.37.50/README-AUTOMATED to get more directions about how
to
set-up the configuration file properly.
Now everything is ready to run the benchmark, this is done
through
the commands:
cd $HOME/bench
./bench_prepare.sh --default-directory
$HOME/bench/test_sysbench
If you want to follow the development of the benchmark in
real-time
you can do this by issuing tail -f on the proper file. For
sysbench
RO benchmarks there will be a file called
$HOME/bench/test_sysbench/sysbench_results/oltp_complex_ro_1.res
for the first test run (you can tell the benchmark to do
several
runs). Do tail -f on this while the benchmark is running and
you'll
get printouts from the sysbench program written on your
console.
Among other things you'll get a string like this:
Intermediate results: 128 threads, 3564 tps
if the current running test uses 128 concurrent connections.
By
default the intermediate results are reported every 3
seconds.
The final result will be reported in the file
$HOME/bench/test_sysbench/final_result.txt
An additional note is that if you want to test the
flexAsynch
tests, then it is necessary to use a source tarball of the
MySQL Cluster 7.x series. This is simply because the
flexAsynch
program isn't distributed in binary tarballs.
The benchmark script will take care of the build process for
all
source tarballs, all important parameters you need to
handle
is part of the autobench.conf script. You will however need
to
install the proper compilers and build tools to enable builds
of
MySQL, sysbench and DBT2 programs.
If you want to benchmark a MySQL Server using the thread pool,
then
it is necessary to download a MySQL Enterprise Edition of the
MySQL
Server. If you already have a commercial license with Oracle,
then
simply use this to download the MySQL binary tarball through
the
edelivery.oracle.com. If you don't have a commercial license,
you
can use the Oracle Software Delivery Cloud Trial License
Agreement
which gives you a 30-day trial license. So to get the binary
tarball
go to edelivery.oracle.com, register if necessary, log in,
answer
all required license agreements.
Next step is to select MySQL Database as the Product Pack and
as
Platform select Linux x86-64. Finally download the TAR file
for
generic Linux2.6 x86-64 platforms. When this download is
completed
then unzip the file and you'll get the gzipped tarball you
need
to run the thread pool benchmark.
Linux x86_64.
The sysbench contains a few extra features compared to the
sysbench-0.4.12 version. It contains support for
intermediate
result reporting, support for multiple tables in the
sysbench
benchmark, support for partitioned tables, support for
using
secondary indexes, support for using HANDLER statements
instead
of SELECT statements, and also support for running sysbench
at
fixed transaction rates with a certain jitter.
DBT2 can in addition to running with a single MySQL Server
also
run with multiple MySQL Servers when used with MySQL
Cluster.
It contains a few new features here to control
partitioning,
possibility to place the ITEM table in each MySQL Server
and
so forth.
All scripts and many programs have updated parameters and
all
scripts have extensive help outputs to make it easy to
understand
what they can do.
It is fairly easy to extend the benchmark scripts. As an
example
if you need to change a parameter which isn't included in
autobench.conf then first add it in bench_prepare.sh and
then
add code to handle it in start_ndb.sh. Also update the
autobench.conf example file if you want to keep the feature
for a longer time. If you want to suggest changes to the
scripts please report it in My Oracle Support
(support.oracle.com)
or in bugs.mysql.com and assign it to Mikael Ronstrom.
Oct
21
2011