← Back to team overview

maria-developers team mailing list archive

Writeup of how to run my group commit benchmark

 

Hi,

For anyone interested in trying to redo my group commit benchmarks on more
interesting hardware than what I have available, here is a writeup of the
steps needed to run it.

The benchmarks are described here:

    http://kristiannielsen.livejournal.com/15739.html
    http://kristiannielsen.livejournal.com/15515.html

1. Compile gypsy.

This is used to generate the load. I use a specific version as the latest in
trunk seemed to not build on non-windows last I tried:

    bzr branch '-rrevid:shane@xxxxxxxxx-20100224065101-jk3s5sro2p914nvp' lp:gypsy
    cd gypsy
    make

This requires `mysql_config` in the path to get includes/libraries for
libmysqlclient. It also needs openssl headers/libraries (eg. install
libssl-dev package).

2. Install MariaDB with group commit enabled.

Packages/sources are available for this here:

    http://kb.askmonty.org/v/mariadb-52-replication-feature-preview

These packages are however missing the --binlog-optimize-thread-scheduling
option that I used to compare the two ways to schedule threads in the above
blog posts. To get that option, grab this bzr tree and build:

    bzr branch lp:~knielsen/maria/mariadb-5.1-mwl116-threadscheduling
    cd mariadb-5.1-mwl116-threadscheduling
    BUILD/compile-pentium64-max

3. Configure and start mysqld

This involves `make install` and `mysql_install_db` when building from source,
check README/INSTALL for details.

For configuration, set whatever parameters are interesting to test. Eg. set
InnoDB buffer pool size and log file/buffer size to something sensible, set
innodb_flush_log_at_trx_commit=1 and sync_binlog=1.

Also create a mysql account and a database with suitable access permissions.

4. Create the table to use:

    mysql --host=127.0.0.1 -utest -ptestpass test
    MariaDB [test]> create table t (a int primary key, b int) engine=innodb;

5. Create the script for Gypsy to generate the load. Just create a file
simpleload.gypsy containing this single line:

-----------------------------------------------------------------------
p|1|REPLACE INTO t (a,b) VALUES (? MOD 1000000, ? MOD 1000000)|int,int
-----------------------------------------------------------------------

6. Run the bemchmark. I run it with `script` to capture the output (yeah, I
know it's crude). The `gypsy` binary is found in the directory where it was
compiled in step (1).

script
for i in 1 4 8 12 16 24 32 48 64 96 128 ; do gypsy --host=127.0.0.1 --user=test --password=testpass --database=test --queryfile=simpleload.gypsy --duration=180 --threads=$i ; done

Adjust host/user/password as appropriate for the installation of mariadb.

7. That should be it! This is obviously a rather crude benchmark, sorry about
that, I did not have experience with something like sysbench or tcp-c, would
be interesting to see results from such benchmarks also.

 - Kristian.