Skip to content

Instantly share code, notes, and snippets.

@nirbhayc
Last active February 23, 2018 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nirbhayc/82828331634c60a1d8e0a0b25b35bbaa to your computer and use it in GitHub Desktop.
Save nirbhayc/82828331634c60a1d8e0a0b25b35bbaa to your computer and use it in GitHub Desktop.
Sysbench notes
Clone:
https://github.com/nirbhayc/sysbench
Command:
mkdir b
./autogen.sh
./configure --with-mysql --with-comdb2 --prefix=/home/nirbhay/comdb2/sysbench/b (--with-debug)
make
make install
export PATH=$PATH:/home/nirbhay/comdb2/nirbhayc/sysbench/b/bin/:/home/nirbhay/comdb2/nirbhayc/sysbench/b/share/sysbench/
export LD_LIBRARY_PATH=/opt/bb/lib/
How to run tests against MariaDB:
sysbench --db-driver=mysql --mysql-host=localhost --mysql-db=test --mysql-user=root --auto_inc=off oltp_read_only prepare
sysbench --db-driver=mysql --mysql-host=localhost --mysql-db=test --mysql-user=root --auto_inc=off oltp_read_only run
sysbench --db-driver=mysql --mysql-host=localhost --mysql-db=test --mysql-user=root --auto_inc=off oltp_read_only cleanup
How to run tests against Comdb2:
sysbench --db-driver=comdb2 --comdb2-db=test --auto_inc=off oltp_read_only prepare
sysbench --db-driver=comdb2 --comdb2-db=test --auto_inc=off oltp_read_only run
sysbench --db-driver=comdb2 --comdb2-db=test oltp_read_only cleanup
Other useful sysbench options:
--db-ps-mode=auto|disable
--thread-init-timeout=100000 # for debugging (default 30)
--time=60 # increase timeout
--comdb2-verbose=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment