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 https://github.com/atomic77/kvbench)
The tool currently supports four test types:
insert-by-pk update-by-pk select-by-pk delete-by-pk
Each operation runs individually and the keys are randomly chosen without replacement for the size of the test.
Currently, the tool supports:
MySQL Postgres 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.
Database type (default "postgres")
Target host (default "192.168.42.223")
Label to add to test result output (default "test")
Number of connections to DB
Number of queries/updates/etc. per conn
Password if required (default "pw1pw1pw1")
Port of db
Test type: prepare, select-by-pk, etc.
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