karan-jadhav/pgbouncer-multicore-limit — explained in plain English
Analysis updated 2026-05-18
Reproduce a local functional test of running multiple PgBouncer processes against one PostgreSQL database.
Run the full measured benchmark on AWS to see real throughput and latency numbers at different process counts.
Use the included Rust load generator to simulate API, export, and connection-cancellation traffic patterns.
| karan-jadhav/pgbouncer-multicore-limit | 0marildo/imago | 100/geotwitter | |
|---|---|---|---|
| Stars | 3 | 3 | 3 |
| Language | Python | Python | Python |
| Last pushed | — | — | 2015-09-10 |
| Maintenance | — | — | Dormant |
| Setup difficulty | hard | easy | moderate |
| Complexity | 4/5 | 2/5 | 3/5 |
| Audience | ops devops | general | general |
Figures from each repo's GitHub metadata at analysis time.
Local smoke test needs Docker, Rust, and uv, the full measured benchmark requires an AWS account and Terraform plus Ansible.
pgbouncer-multicore-limit is a research project that reproduces and measures a specific performance limit in PgBouncer, the popular PostgreSQL connection pooler. PgBouncer normally runs as a single process, which caps it at using one CPU core no matter how powerful the server is. This repo tests what happens when you run several PgBouncer processes side by side, sharing the same pool of database connections, to see how much extra throughput that unlocks. You can run a smaller functional version of the experiment on your own laptop using Docker Compose, which needs Docker, Rust, the uv Python tool, and Terraform installed. A single command builds PostgreSQL, builds PgBouncer from source with checksum verification, builds a custom Rust load testing tool, and then runs a full local test sequence: it loads a fixed dataset, sends traffic through one PgBouncer process, then through four processes sharing a port, checks an exported data stream, and finally validates and files each run as accepted or rejected. The local run uses a small dataset so it is meant for checking the process works, not for drawing performance conclusions. The custom Rust load generator can simulate several kinds of traffic, including steady API requests, data exports, new connections, cancellations, and mixed workloads, and it records detailed timing statistics for each run, down to full latency histograms. The real measured results come from a matching setup on AWS, built and torn down with Terraform and Ansible, and none of that cloud infrastructure gets created until you explicitly run a specific setup command and approve the plan. In the completed AWS test, using 256 clients and a fixed total connection budget, going from one PgBouncer process to eight roughly quadrupled throughput, from about 45,000 to about 210,000 queries per second, while the response time got faster too. At that point PostgreSQL itself became the bottleneck rather than PgBouncer. A blog post linked from the README explains the full methodology and its limitations, and every run raw data, logs, and validation status are saved for inspection, whether the run passed or was rejected. The project includes commands to generate charts and summaries from all accepted results.
A benchmark project that measures how running multiple PgBouncer processes in parallel scales PostgreSQL throughput past PgBouncer's single-core limit.
Mainly Python. The stack also includes Python, Rust, Terraform.
No license information is stated in the README.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly ops devops.
This repo across BitVibe Labs
Verify against the repo before relying on details.