Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pgcat less performant than pgbouncer or misconfiguration? #872

Open
garry-t opened this issue Nov 18, 2024 · 0 comments
Open

Pgcat less performant than pgbouncer or misconfiguration? #872

garry-t opened this issue Nov 18, 2024 · 0 comments

Comments

@garry-t
Copy link

garry-t commented Nov 18, 2024

Describe the bug
I expect that pgcat has to be more performant than pgbouncer at least due multithreading, but seem like it is not. I've run simple syntetic test, see below. I need to get TPS value high as much as possible. And no matter what pool size I set for pfgcat and how many workers, pgbouncer has always an advantage in TPS.
To Reproduce

  1. Install pgcat and configure with pool size 100, workers = 2
  2. Install pgbouncer set pool size 100
  3. Run pgbench from another VM
    pgbench -c 100 -j 2 -t 1000 db -h IP -p 6433|6432 -U user

Expected behavior
TPS higher than for pgbouncer

Screenshots
n/a
Desktop (please complete the following information):

  • Ubuntu 22.04
  • Hetzner VM cx22

Test results:
both tools configured to transaction mode. Pool size set 100 for pgcat and pgbouncer, max_connection set to 200.

# pgcat 

transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 100
number of threads: 2
number of transactions per client: 1000
number of transactions actually processed: 100000/100000
latency average = 118.267 ms
initial connection time = 102.550 ms
tps = 845.546899 (without initial connection time)

# pgbouncer

transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 100
number of threads: 2
number of transactions per client: 1000
number of transactions actually processed: 100000/100000
latency average = 110.804 ms
initial connection time = 148.209 ms
tps = 902.494788 (without initial connection time)

# postgresql

transaction type: <builtin: TPC-B (sort of)>
scaling factor: 50
query mode: simple
number of clients: 100
number of threads: 2
number of transactions per client: 1000
number of transactions actually processed: 100000/100000
latency average = 114.526 ms
initial connection time = 956.368 ms
tps = 873.167031 (without initial connection time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant