Skip to content

picodata/stroppy

Repository files navigation

stroppy - Load Testing Tool for Distributed Databases

Building stroppy from source

  1. Clone and open picostess project:

    cd stroppy
  2. Install go.

  3. Install xk6 toolchain:

    go install go.k6.io/xk6/cmd/[email protected]
  4. Run tests:

    make test
  5. Build stroppy binary:

    make build

Before running stroppy

Create test user

echo "CREATE USER \"stress\" WITH PASSWORD 'T0psecret' USING md5;
ALTER USER \"stress\" WITH LOGIN;
GRANT CREATE TABLE TO \"stress\";
GRANT ALTER TABLE TO \"stress\";
GRANT DROP TABLE TO \"stress\";
GRANT READ TABLE TO \"stress\";
GRANT WRITE TABLE TO \"stress\";" | picodata admin path/to/admin.sock

Note: due each protocol uses diffrent auth method, you can change it, using this command:

echo "ALTER USER \"stress\" WITH PASSWORD 'T0psecret' USING chap-sha1;" | picodata admin path/to/admin.sock

Hosts discovery

By running scripts/create_table_with_addrs.py script,
you can create table, which will contain iproto and pgproto addresses
for the each picodata instance:

python3 scripts/create_table_with_addrs.py -p path/to/instance/folders -t preferable_table_name

Flags:

  1. -p: path to folder where instances (--data-dir) folders are located. Each instance folder must contain admin.sock file.
  2. -t: name of table, that will be created.

Due iproto/pgproto addresses inside cluster cant be accuired by executing a SQL command,
this script will only be useful if all picodata instances are running on the same machine and admin.sock files can be reached within a single machine.
If Picodata instances are running on separate machines - execute python script on each machine.

After a successful execution, you only need to provide a single host:port using the --addrs flag, when passing --atbl flag.

Running stroppy

  1. Create a config yml file, guiding by config docs file.
    The Config file is essential and is used by all commands.

  2. Run stroppy:

    ./stroppy [command] [flags]

Commands

To list all available commands and flags description:

./stroppy help
./stroppy help [command]
./stroppy [command]

Example of usage

  • schema up: setup test tables, indexes inside database
./stroppy schema up -c=./scripts/configs/queue.yml -u=stress -p=T0psecret --proto=pgwire -a=localhost:5431,localhost:5432 --sf=1 -w=20 -b=100 -s=42
  • schema drop: drop test tables, indexes inside database
./stroppy schema drop -c=./scripts/configs/queue.yml -u=stress -p=T0psecret --proto=pgwire -a=localhost:5431,localhost:5432
  • bench: suitable for benchmarking
./stroppy bench -c=./scripts/configs/bench.yml -u=stress -p=T0psecret --proto=pgwire -a=localhost:5431,localhost:5432 -o=./summary -e=50 -s=42 -d=5s --vu=2 --maxvu=200 --rps=100
  • queue: suitable for SQL testing
./stroppy queue -c=./scripts/configs/queue.yml -u=stress -p=T0psecret --proto=pgwire -a=localhost:5431,localhost:5432 -o=./summary -s=42 --vu=2

About

stroppy - stress test tool for different databases

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 11

Languages