Re: pgpool-II (max_pool and num_init_children)

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: lists(at)serioustechnology(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pgpool-II (max_pool and num_init_children)
Date: 2010-07-02 12:03:05
Message-ID: 20100702.210305.100426339.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I'm trying to get a handle on sane values for these two parameters. I
> assume that they should somehow correlate to my existing
> max_connections in my postgresql.conf file. Anyone using pgpool-II care
> to comment?
>
> I'm sure it's a balancing act between how many connections you want
> verses how many cached connections you have, but not sure how to
> properly assess this issue.
>
> (I've tried posting to the pgpool list, but it's apparently unavailable
> at this time)

Here is an recommended rule:

max_pool*num_init_children <= (max_connections - superuser_reserved_connections)

Because num_init_children defines the max concurrent connections
pgpool-II can accept, you might want to keep num_init_children as
large as possible. In this case you could lower max_pool to as low as
1, which may cause performance degration because of low effect of
connection cache if you would have more than 1 user/database
combinations. However lower max_pool will not any error or any
problems except performance.

If you want to use query cancelation frequetntly, the formula above
will become:

max_pool*num_init_children*2 <= (max_connections - superuser_reserved_connections)

because you need extra connection to use query cancelation.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Norberto Delle 2010-07-02 12:10:44 Autovacuum and pg_largeobject
Previous Message Tim Landscheidt 2010-07-02 11:56:02 Re: Query to "balance" rows across multiple tables