50-60ms per-query overhead in PgPool-II 4.7 vs direct connection

From: Ernesto Montilva <pskloud(dot)emontilva(at)gmail(dot)com>
To: pgpool-general(at)lists(dot)postgresql(dot)org, pgpool-hackers(at)lists(dot)postgresql(dot)org, pgpool-committers(at)lists(dot)postgresql(dot)org, pgpool-buildfarm(at)lists(dot)postgresql(dot)org
Subject: 50-60ms per-query overhead in PgPool-II 4.7 vs direct connection
Date: 2026-09-07 14:59:56
Message-ID: CAHGVCTFHRRe3kLANmLsZgC-uaQTOsKRKrWU8hD1xv7h4gz6PCw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgpool-buildfarm pgpool-committers pgpool-general pgpool-hackers

Hi PgPool team,

We run a payment processing system with PostgreSQL 18 and PgPool-II 4.7.0.
Each transaction executes ~75 queries. We have noticed significant overhead
compared to direct connection:

*Measurements:*

-

Direct to PostgreSQL: ~50ms per query
-

Through PgPool: ~100-110ms per query
-

Difference: +50-60ms per query

*Production impact:*

-

75 queries × 50ms extra = ~3.75 seconds overhead per transaction
-

Full transaction: 2-3 seconds with PgPool vs 0.5-1 second direct

*Current PgPool configuration:*
ssl = off
load_balance_mode = off
num_init_children = 1100
max_pool = 1
connection_cache = on
child_life_time = 300
connection_life_time = 300

*What we already tried (no improvement):*

-

ssl = off (helped a little)
-

num_init_children = 300-800 (no change)
-

child_life_time = 0 (no change)
-

connection_life_time = 1800 (no change)
-

max_pool = 4 (no change)
-

relcache_size = 1024 (no change)
-

use_remote_estimate and fetch_size on FDW (improved FDW queries)

*Question:*
Is there any parameter or configuration to reduce per-query overhead in
PgPool-II? Is it possible to achieve near-direct connection times while
keeping failover and load balancing?

Any guidance is greatly appreciated.

Best regards,

Ernesto Montilva

--

Browse pgpool-committers by date

  From Date Subject
Next Message Taiki Koshino 2026-09-09 08:15:59 pgpool: Fix: Reset removed config parameters to defaults
Previous Message Tatsuo Ishii 2026-09-06 22:56:56 pgpool: Revert "Fix do_query to send sync rather than flush."

Browse pgpool-hackers by date

  From Date Subject
Next Message Koshino Taiki 2026-09-08 07:27:10 Fix internal transaction handling in raw mode
Previous Message Koshino Taiki 2026-09-04 06:33:22 Re: [PATCH v1] Fix hang on deferred constraint errors in pipeline mode

Browse pgpool-buildfarm by date

  From Date Subject
Previous Message pengbo 2026-06-29 17:31:32 Pgpool-II buildfarm results RockyLinux9

Browse pgpool-general by date

  From Date Subject
Previous Message Achilleas Mantzios 2026-09-07 06:36:55 Re: low level protocol, implicit transactions , "idle in transaction" issue