zlacker

[return to "Postgres Postmaster does not scale"]
1. levkk+F32[view] [source] 2026-02-05 04:51:17
>>davidg+(OP)
One of the many problems PgDog will solve for you!
◧◩
2. eatonp+Y32[view] [source] 2026-02-05 04:56:40
>>levkk+F32
The article addresses this, sort of. I don't understand how you can run multiple postmasters.

> Most online resources chalk this up to connection churn, citing fork rates and the pid-per-backend yada, yada. This is all true but in my opinion misses the forest from the trees. The real bottleneck is the single-threaded main loop in the postmaster. Every operation requiring postmaster involvement is pulling from a fixed pool, the size of a single CPU core. A rudimentary experiment shows that we can linearly increase connection throughput by adding additional postmasters on the same host.

◧◩◪
3. evanel+0A3[view] [source] 2026-02-05 16:51:30
>>eatonp+Y32
> I don't understand how you can run multiple postmasters.

I believe they're just referring to having several completely-independent postgres instances on the same host.

In other words: say that postgres is maxing out at 2000 conns/sec. If the bottleneck actually was fork rate on the host, then having 2 independent copies of postgres on a host wouldn't improve the total number of connections per second that could be handled: each instance would max out at ~1000 conns/sec, since they're competing for process-spawning. But in reality that isn't the case, indicating that the fork rate isn't the bottleneck.

[go to top]