Charmed Sysbench Documentation | Home

Charmed Sysbench Documentation

Charmed Sysbench is a multipurpose tool for benchmarking database applications with complex workloads. It can be deployed and used in both K8s and VM installations. To get started, integrate it with your database charm to begin running performance tests and visualize results.

Sysbench is an industry standard benchmarking tool which uses the Percona Lab implementation of the TPC-C standard.

This charm currently supports:

The legacy interfaces mysql and pgsql are not supported. For more information about modern charm interfaces, see this reference.

Contact us if you have any issues or questions about your use case.

Summary


Quickstart

Deploy sysbench:

juju deploy sysbench

Integrate it with your charm:

juju integrate sysbench <your_db_charm>

Prepare the test database and run a performance test:

juju run sysbench/leader prepare
juju run sysbench/leader run

Stop the test:

juju run sysbench/leader stop

Clean/remove the test database:

juju run sysbench/leader clean

Configure

You can specify certain parameters for your test runs like threads and duration:

juju config sysbench threads=<num_threads> duration=<seconds>

For a full list of the available config parameters, see the Configuration tab.

Monitoring

The sysbench charm supports COS integration.

To use COS, integrate this charm with the grafana-agent or grafana-agent-k8s charm. It will open a scrape endpoint for the agent to collect metrics.

There are currently no supported Grafana dashboards, but the data can be accessed directly on Prometheus:


Otherwise, it is possible to retrieve in-progress test results from the Prometheus exporter manually:

curl http://<sysbench_unit_ip>:8088

See all exposed metrics in the dedicated reference page.

Measure CPU/RAM/IO performance

The charm can be used as a tool to measure HW performance, e.g. CPU/RAM/IO:

juju deploy sysbench --to 0 # where 0 is the Juju id for VM/HW to load

juju ssh sysbench/0 bash

# CPU Benchmark
sysbench --test=cpu --cpu-max-prime=150000 run
sysbench --test=cpu --cpu-max-prime=150000 run --num-threads=$(nproc)
 
# IO Benchmark
sysbench --test=fileio --file-total-size=100G --file-test-mode=seqwr run
sysbench --test=fileio --file-total-size=100G cleanup
 
# MEMORY Benchmark
sysbench --test=memory --memory-block-size=1M --memory-total-size=16G run

Project and community

Charmed Sysbench is an open source project based on sysbench that warmly welcomes community contributions, suggestions, fixes and constructive feedback.