Public Repository

Last pushed: 2 years ago
Short Description
Simple sysbench inspired benchmark for K-V and relational databases
Full Description

This is a simple sysbench-inspired benchmarking tool for RDBMS and key-value systems written in Go. It has been written to test systems for key-value type workloads (for the reasons why I would want to do such a thing, see the blog post this tool was built for and the source code here


The tool currently supports four test types:


Each operation runs individually and the keys are randomly chosen without replacement for the size of the test.
System support

Currently, the tool supports:

Vanilla Memcached
Memcached-innodb (from)

Eventually I would like to expand this to test other NoSQLish systems and JSONB and HStore for Postgres.

The tool has been dockerized with the main kvbench binary as the entry point to make it easy to deploy along with the desired database to test.

Parameters supported:

-db string
Database type (default "postgres")
-host string
Target host (default "")
-label string
Label to add to test result output (default "test")
-num-connections int
Number of connections to DB
-num-operations int
Number of queries/updates/etc. per conn
-password string
Password if required (default "pw1pw1pw1")
-port int
Port of db
-test string
Test type: prepare, select-by-pk, etc.
-user string
Username if required (default "u1")

E.g. to use with docker, you can run with a command like:

docker run --rm -i -t --link postgrestest:pgtst atomic77/kvbench \
-db postgres -user postgres -host pgtst -port 5432 -num-connections 4 \
-num-operations 1000 -test select-by-pk

The above runs the kvbench tool against the pgsql database running in the postgrestest container, with 4 client connections running random selects with 1000 s

Docker Pull Command