[pgpool-general: 4701] Re: pools vs connections

Tatsuo Ishii ishii at postgresql.org
Sat May 21 21:02:00 JST 2016


Yes.

If the number of combinations exceeds max_pool, the oldest connection
pool is deleted and the slot will be reused.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> I see. So max_pool should optimally equal the number of user-database combinations that exists?
> 
> Regards
> Henrik
> 
> ________________________________________
> Från: pgpool-general-bounces at pgpool.net <pgpool-general-bounces at pgpool.net> för Tatsuo Ishii <ishii at postgresql.org>
> Skickat: den 20 maj 2016 20:48
> Till: gearond at gmail.com
> Kopia: pgpool-general at pgpool.net
> Ämne: [pgpool-general: 4696] Re: pools vs connections
> 
> It corresponds to the connection cache between pgpool-II and
> PostgreSQL backend. If a pgpool child process (which corresponds to
> each session between client and pgpool) handled user A/database X,
> user B/database Y in its history, it keeps connection caches in
> pool[0] for user A/database X, pool[1] for user B/database Y. If the
> next client wants to connect as user B/database Y, the connection
> cache in pool[1] will be reused.
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp
> 
>> I see what init_children does, what does max pool do?
>> On May 20, 2016 11:21 AM, "Tatsuo Ishii" <ishii at postgresql.org> wrote:
>>
>>> Yes, exactly.
>>>
>>> Best regards,
>>> --
>>> Tatsuo Ishii
>>> SRA OSS, Inc. Japan
>>> English: http://www.sraoss.co.jp/index_en.php
>>> Japanese:http://www.sraoss.co.jp
>>>
>>> > Thanks for your clarification. So, the following config would only serve
>>> two concurrent database connections?
>>> >
>>> > num_init_children = 2
>>> > max_pool = 110
>>> >
>>> > Regards
>>> > Henrik
>>> >
>>> > ________________________________________
>>> > Från: Tatsuo Ishii <ishii at postgresql.org>
>>> > Skickat: den 20 maj 2016 19:31
>>> > Till: Henrik Uggla
>>> > Kopia: pgpool-general at pgpool.net
>>> > Ämne: Re: SV: [pgpool-general: 4689] pools vs connections
>>> >
>>> >> But right now we have the following configuration which I thought was
>>> "many pools with one connection each". Could you please explain how our
>>> current config handle pools and connections.
>>> >
>>> > The comment in the pgpool.conf is pretty confusing. Sorry. That should
>>> > be read (I will fix it later on) as:
>>> >
>>> > # - Concurrent session and pool size -
>>> >
>>> > num_init_children = 220
>>> >                                     # Number of concurrent sessions
>>> allowed
>>> >                                     # (change requires restart)
>>> > max_pool = 1
>>> >                                     # Number of connection pools per
>>> session
>>> >                                     # (change requires restart)
>>> >
>>> > Best regards,
>>> > --
>>> > Tatsuo Ishii
>>> > SRA OSS, Inc. Japan
>>> > English: http://www.sraoss.co.jp/index_en.php
>>> > Japanese:http://www.sraoss.co.jp
>>> >
>>> >> /Henrik
>>> >>
>>> >>
>>> #------------------------------------------------------------------------------
>>> >> # POOLS
>>> >>
>>> #------------------------------------------------------------------------------
>>> >>
>>> >> # - Pool size -
>>> >>
>>> >> num_init_children = 220
>>> >>                                    # Number of pools
>>> >>                                    # (change requires restart)
>>> >> max_pool = 1
>>> >>                                    # Number of connections per pool
>>> >>                                    # (change requires restart)
>>> >>
>>> >> ________________________________________
>>> >> Från: Tatsuo Ishii <ishii at postgresql.org>
>>> >> Skickat: den 20 maj 2016 16:34
>>> >> Till: Henrik Uggla
>>> >> Kopia: pgpool-general at pgpool.net
>>> >> Ämne: Re: [pgpool-general: 4689] pools vs connections
>>> >>
>>> >>> Hi!
>>> >>>
>>> >>>
>>> >>> We have an web application which starts a whole bunch (100+) of
>>> concurrent database connections. All connections is within the same server,
>>> to the same database and with the same credentials, only read operations,
>>> no write. Which configuration would yield the best performance? One pool
>>> with many connections or many pools with one connection each?
>>> >>
>>> >> Pgpool-II does not provide "many pools with one connection each" type
>>> >> of configuration. The only configuration you can use is "One pool with
>>> >> many connections".
>>> >>
>>> >> Best regards,
>>> >> --
>>> >> Tatsuo Ishii
>>> >> SRA OSS, Inc. Japan
>>> >> English: http://www.sraoss.co.jp/index_en.php
>>> >> Japanese:http://www.sraoss.co.jp
>>> _______________________________________________
>>> pgpool-general mailing list
>>> pgpool-general at pgpool.net
>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>>>
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general


More information about the pgpool-general mailing list