[pgpool-general: 6243] Re: High memory Usage

Araujo Manuel Emilio emilio.araujo at gmail.com
Sat Sep 22 20:34:16 JST 2018


@Piotr...
I will try again :)

Maybe you do not need that connection pool configuration. Read this,
because  num_init_children  and  max_pool  parameters can bring confusion:
https://www.pgpool.net/mediawiki/index.php/Relationship_between_max_pool,_num_init_children,_and_max_connections

For example: I have multiple users connecting to multiple databases through
multiple applications (web and desktop). After some tests the configuration
that works better for my is:

num_init_children = 800
max_pool = 1
child_life_time = 120
child_max_connections = 0
connection_life_time = 0
client_idle_limit = 0

NOTE: The desktop clients (around 500) connect to the database and keep the
connection until the application is closed. That's why I do not need
connection pool.

The machines are:
1) Two pgpool 3.6.4 nodes : Centos 7, 6 processors and 6GB Ram.
Normally does not reach 50% of memory and 30% of processors.

In the past I had problems with a hight memory usage (almost 100%), but it
was caused by a test with memmory_cache_enabled = on, when I setted to off,
the problem was solved.

2) Two postgres 9.6 nodes: Centos 7, 12 cores, 16GB Ram
Normally does not reach 40% of memory and 40% of processors.

Regards,

El vie., 21 de sep. de 2018 a la(s) 08:21, Tatsuo Ishii (ishii at sraoss.co.jp)
escribió:

> > When I stop client, then memory usage starts decreasing, so it’s good
> assumption that is not memory leak?
>
> Probably child_life_time affects here. If Pgpool-II child process are
> in ilde state because clients gets diconnected, they sucide after 300
> seconds (according to your pgpool.conf) passed.
>
> > What do you mean by self contained test case?
>
> A test case which can be executed by someone else (Pgpool-II
> developers).
>
> > I probably can increase mamry on VM, but what size should be good?
>
> No idea at this point. If the memory usage is caused by memory leak,
> there will be no memory usage limit. If that is not caused by memory
> leak, the only way to guess the value is observe the memory usage
> until they go into a steady state.
>
> >> Wiadomość napisana przez Tatsuo Ishii <ishii at sraoss.co.jp> w dniu
> 21.09.2018, o godz. 01:26:
> >>
> >> Is it possible for you to provide a self contained test case?
> >>
> >> You have 175 pgpool process. So each process allows to use up to
> >> 16GB/175 = 93.6MB RAM (of course this number does not include the
> >> memory for OS).  With this number, it is hard to tell if it's caused
> >> by memory leak or normal, since if applications send large SQL texts
> >> or receive large data set returned from PostgreSQL, they could easily
> >> eat this amount of memory. So self contained case is essential to know
> >> whether this is a memory leak or normal thing.
> >>
> >> Best regards,
> >> --
> >> Tatsuo Ishii
> >> SRA OSS, Inc. Japan
> >> English: http://www.sraoss.co.jp/index_en.php
> >> Japanese:http://www.sraoss.co.jp
> >>
> >>> Hi,
> >>> OS - Ubuntu 16.04
> >>> pgpool.conf -
> https://gist.github.com/pwojcieszonek/c0a8f670982f021f5e3f4fba2a7b52ae <
> https://gist.github.com/pwojcieszonek/c0a8f670982f021f5e3f4fba2a7b52ae>
> >>>
> >>>
> >>>> Wiadomość napisana przez Bo Peng <pengbo at sraoss.co.jp> w dniu
> 20.09.2018, o godz. 08:04:
> >>>>
> >>>> Which OS do you use?
> >>>> And could you provide pgpool.conf?
> >>>>
> >>>> On Wed, 19 Sep 2018 14:09:21 +0200
> >>>> Piotr Wojcieszonek <p.wojcieszonek at bosmanager.com> wrote:
> >>>>
> >>>>> Hi,
> >>>>> I have problem with PG-POOL with high memory usage.
> >>>>> After couple of minutes it consume all of 16GB of ram and start
> using SWAP.
> >>>>> When I restart service it start to slowly alocate all of available
> memory.
> >>>>> I check on 3.7.4 and 3.7.5
> >>>>>
> >>>>> _______________________________________________
> >>>>> pgpool-general mailing list
> >>>>> pgpool-general at pgpool.net
> >>>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Bo Peng <pengbo at sraoss.co.jp>
> >>>> SRA OSS, Inc. Japan
> >>>>
> >>>
> >
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20180922/83a6884f/attachment.html>


More information about the pgpool-general mailing list