[Pgpool-general] pgpool problems

Bjoern Metzdorf bm at turtle-entertainment.de
Thu Feb 24 09:02:04 GMT 2005


Tatsuo Ishii wrote:
> greetings to Denmark!

nearly :) .de is Germany.

> If your web application connect to PostgreSQL as all same user, say
> "nobody", raising max_pool will not benefit at all. Actually in this
> case max_pool = 1 is sufficiant. However since max_pool slot eat very
> little memory, you might want to leave as it is.
> 
> Changing num_init_children will affect the total throughput. In
> theory, lowering num_init_children will decrease the load of
> PostgreSQL but increase the chance for pg_connect waiting for next
> available pgpool's child process. Increasing num_init_children will
> have opposite effect. So there must be a sweet spot for
> num_init_children. I suggest you play around several num_init_children
> settings seeking for the sweet spot.

This is how I understand pgpool:

num_init_children is amount of preforked processes, each is connected to 
postgresql. (postgresql processes = num_init_children)

max_pool is amount of connections that each pgpool child accepts.
(max connections to pgpool possible = num_init_children * max_pool)
If I set max_pool to 10 then each pgpool child accepts 10 connections 
which get all "tunneled" through the one connection from this pgpool 
child to postgresql process.

This means to lower idle postgresql processes I can in theory lower 
num_init_children and raise max_pool to satisfy my (low number of) 
postgresql connections.

My understanding seems to be wrong if you say that max_pool = 1 is 
sufficiant if I only have one database user.

Can you enlighten me? :)

Regards,
Bjoern


More information about the Pgpool-general mailing list