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 uncover synchronization/locking/memory management issues
- Provide a framework for writing complex test scenarios in a user-friendly format (TODO)
Currently it works with PostgreSQL and is used for testing pg_tde
.
Installation
For now, there are no prebuilt packages. StormWeaver has to be built from source.
See Building from source for details.
A first scenario
StormWeaver stores test scenarios in the scenarios
folder, written in Lua.
There is a scenario called basic
with lots of comments intended as a first example.
To run it, execute the following command:
cd stormweaver
bin/stormweaver scenarios/basic.lua [-c config/stormweaver.toml] [-i /path/to/the/pg/folder/] [scenario specific arguments...]
This script will:
- Set up a new data directory in
datadirs/datadir_pr/...
- Start PostgreSQL with this data directory
- Unless the
WITHOUT_TDE
environment variable is defined, configurepg_tde
- Start the server instance
- Create normal or encrypted tables based on the above setting
- Run a 20-second workload on the server, 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:
- A quick high-level overview of how the project is constructed from a user's perspective
- The configuration options supported by the default scripting framework
- What functions are available in the scenario scripts