Getting started
StormWeaver is a concurrent database testing tool, inspired by PStress.
It has two goals:
- Provide a framework for writing highly concurrent somewhat randomized tests, to stress the database server, and to try to uncover syncrhonization/locking/memory management/... issues
- Provide a framework for writing complex test scenarios in a user-friendly format (TODO)
Currently it works with PostgreSQL, and used for testing pg_tde
.
Installation
For a simple start, execute:
This will:
- Clone the StormWeaver repository in a folder called
stormweaver
- Try to download the prebuilt binaries from github, if available, or report a failure.
Currently prebuilt binaries exists for Ubuntu 22.04 and Ubuntu 24.04.
Or alternatively it is possible to build StormWeaver from sources manually, for that see Building from source.
A first scenario
StormWeaver stores test scenarios in the scenarios
folder, written in lua.
There is a scenario called example
with lots of comments intended as a first example.
To run it, execute the following command:
cd stormweaver
bin/stormweaver scenarios/example.lua [-c config/stormweaver.toml] [-i /path/to/the/pg/folder/] [scenario specific arguments...]
This script will:
- Setup a new data directory in
datadirs/datadir_pr/...
- Start up PostgreSQL with this data directory
- Unless the
WITHOUT_TDE
environment varialbe is defined, it configurespg_tde
- Starts up the server instance
- Creates normal or encrypted tables based on the above setting
- Runs a 20 second workload on the server repeating, repeating 10 times.
Each time it randomly restarts the server, or sends a
kill -9
signal.
What's next?
More details about the use of StormWeaver can be found in the following sections:
- About a quick high level overview of how the project is constructed from a users perspective
- About the configuration options supported by the default scripting framework
- About what functions are avaialble in the scenario scripts