[pgpool-general: 7755] Re: Out of memory

Tatsuo Ishii ishii at sraoss.co.jp
Mon Oct 11 10:08:46 JST 2021


>> I'm running a 4.4.276 kernel.
>> 
>> 1) When psql connected:
>> $ ps uax | grep pgpool | grep idle
>> root     17167  0.0  0.0  39044  2576 ?        S    11:30   0:00 pgpool:
>> XXXX XXXX 192.168.XXX.XXX(34812) idle
>> 
>> 2) After issue "begin;"
>> $ ps uax | grep pgpool | grep idle
>> root     17167  0.0  0.2  72200 37044 ?        S    11:30   0:00 pgpool:
>> XXXX XXXX 192.168.XXX.XXX(34812) idle in transaction
>>
>> Then a installed pgpool on another machine running 5.14.3:
>> 
>> 1) When psql connected:
>> $ ps aux | grep pgpool | grep idle
>> root     13430  0.0  0.0  13548  3096 ?        S    11:58   0:00 pgpool:
>> XXXX XXXX ::1(56142) idle
>> 
>> 2) After issue "begin;"
>> $ ps aux | grep pgpool | grep idle
>> root     13430  0.0  0.2  46704 36804 ?        S    11:58   0:00 pgpool:
>> XXXX XXXX ::1(56142) idle in transaction
>> 
>> Attached is my full pgpool.conf, maybe I'm missing something obvious.
> 
> Thanks.  I will look into that.

In your pgpool.conf, I noticed this:

relcache_size = 16384

Since the default is 256, your setting will consume 64 times more
memory for *each* pgpol child process. Since num_init_children is 150,
which is 4 times larger than the default, your memory consumption for
the relcache is 64*4 = 256 times larger than the default. I guess this
is at least one of the reason which causes the memory issue.

If all 150 relcache entries are filled, each process will consume 48MB
of memory, which is 48 * 150 /1024 = 7GB, in total.

With shared relacache enabled, each pgpool child can share the
existing relacache info. So you don't need to assign that 16384 to
relcache_size. Can you try with the default value of relcache_size (256)?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-general mailing list