This container is about doing some load testing on Postgres.
50K+
If you want to download the binary and run the tool directly:
curl -OL https://github.com/MannemSolutions/pg_tps_optimizer/releases/download/v0.1.3/pg_tps_optimizer_v0.1.3_x86_64-unknown-linux-musl.zip
unzip pg_tps_optimizer*.zip
./pg_tps_optimizer --dsn 'host=server1,user=postgres,dbname=postgres,password=password123' --max-wait 10s --min-samples 10 --range 200 --spread 10
Note that with the binary you need to set all the arguments as shown in the above example...
If you wanna use the container instead:
docker run -e PGHOST=server1,PGUSER=postgres,PGDATABASE=postgres,PGPASSWORD=password123 mannemsolutions/pg_tps_optimizer
Note that with the container you can set environment variables and leave other arguments default. If you wanna change defaults, you do need to set all of them (might be fixed in future releases)...
If you wanna change options, you can:
--max-wait to set the timeout for a step--min-samples to wait more timeslices of 200ms before accepting a step to be 'stable',
printing results and moving to the next number of clients--range to change the upper bound.
The tool follows the fibonacci sequence, so (as an example) there is no difference between an upper bound of 99 and an upper bound of 100.
In both cases 89 is the last step...--spread to be more precise in when the tool decides a step is considered 'stable'.Example:
docker run -e PGHOST=server1,PGUSER=postgres,PGDATABASE=postgres,PGPASSWORD=password123 mannemsolutions/pg_tps_optimizer \
--max-wait 20s --min-samples 20 --range 200 --spread 5
This will do the following:
This repo is about doing some load testing on Postgres. The concept is that depending on #clients first tps increases, and then latency increases, as such tps/latency works like a curve. We want to find the optimal #clients with max utilization (max tps against lowest latency).
Max utilization is system dependant:
How it works:
In the end you have a report (table) describing TPS and Latency depending on the number of clients.
Depending on your needs you can:
Most tools are typically designed to be used as a benchmark investigation. Properly benchmarking is more of an academic approach and requires a lot of preparation, human effort, hardware resources, etc. And there are many situations where the investment is too big and the results are not entirely what you are looking for. Some examples are:
In all of these cases pg_tps_optimizer can help you to gather the information. And of coarse, you can always check by running one pgbench run, just to see if they agree.
We love ur software and want them to grow. Therefore we embrace open Source, and invite you to join the community and contribute. Therefore we feel that GPL-3.0 license best meets the needs of our users and the community. In general:
We are open source, and are always open to contributions.
Content type
Image
Digest
sha256:b31b9843d…
Size
53.9 MB
Last updated
almost 3 years ago
docker pull mannemsolutions/pg_tps_optimizer