I have a server with multiple cores that is supposed to run pgBouncer (1.7).

It's working pretty well, but it utilises only one CPU core. I get pretty high latency values when I do a load test with pgbench, emulating several clients (27 ms without pgBouncer, and 62 ms with pgBouncer).

How can I make pgBouncer use all available CPU cores?

  • As my understand from your question: suppose that your server has 8 physical CPUs. But it uses only 1 physical CPU for pgBouncer when pgBench, right ? If the answer is yes, how can you know pgBouncer uses only 1 CPU ? (because there are a lot of running process when pgBench)
    – Luan Huynh
    Commented Sep 14, 2016 at 4:33
  • i started pgbench on another Server. The Server running pgbouncer runs nothing else than pgbouncer. i assume that pgbouncer is using only one cpu because htop showed only one cpu at 100% the others at maximum 1%. Commented Sep 14, 2016 at 9:13

1 Answer 1


Pgbouncer implementation is based on epoll system call and runs one thread only. You pretty much have to run several pgbouncer processes to utilize more cores(one process per core). But it is what you want to do only when pgbouncer is a bottleneck.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.