Tag

PgBouncer

2 stories

ClickHouse turned PgBouncer's one CPU core into sixteen for 4x throughput (clickhouse.com)

On a 16-vCPU box, one PgBouncer process topped out around 77,000 transactions per second at 256 clients while using under 8 percent of the machine. ClickHouse's Postgres team ran sixteen processes on the same port instead, using a kernel trick called so_reuseport, and throughput jumped to 336,000 — roughly 4x — with a fix for cancel requests that used to vanish into the wrong process. One reply in the thread was blunter: Yandex already ships a pooler built to do this natively, no patch required.

Not just a headline — the discussion unpacked

The top HN threads: facts from the discussions, both sides, insider voices. Email, Telegram, or RSS.

A Postgres pooler that fixes the leak where one client's session bleeds into another (pgdog.dev)

PgDog ships its own SQL parser so it can track SET, LISTEN/NOTIFY and prepared statements per client and restore them before each query, the exact features PgBouncer's transaction mode makes you give up. Kokotov says it's run a year in production at 2M queries/sec.

The thread's war stories agreed the tax is real: one engineer who'd just moved a Django app behind PgBouncer found queryset.iterator()'s server-side cursors didn't survive pooling, and statement_timeout in libpq startup params got silently ignored.