From: | Sam Dai <sam(dot)dai(at)servicemax(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #14606: Memory usage continue to increase |
Date: | 2017-03-30 13:24:53 |
Message-ID: | CAO+pR0pCdL5LGp2Wsn8up1UdNkcN0HBnHd4-4dXWJU3Yj6p0HQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
My application used ComboPooledDataSource to connect to Postgresql server,
the setting is as below, if this issue is syscache bloat, what is the
solution of this issue?
<bean id="datasource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<!-- connection properties -->
...
<!-- pool size -->
<property name="acquireIncrement" value="3" />
<property name="initialPoolSize" value="5" />
<property name="maxPoolSize" value="20" />
<property name="minPoolSize" value="5" />
<!-- trim old connections -->
<property name="maxConnectionAge" value="300" /> <!-- 5 min -->
<property name="maxIdleTime" value="180" /> <!-- 3 min -->
<property name="maxIdleTimeExcessConnections" value="60" /> <!-- 1 min -->
<property name="numHelperThreads" value="6" />
<!-- test connections -->
<property name="idleConnectionTestPeriod" value="300" /> <!-- 5 min -->
<property name="testConnectionOnCheckin" value="true" />
<property name="preferredTestQuery" value="SELECT 1" />
<!-- disable prepared statement caching -->
<property name="maxStatements" value="0" />
<property name="maxStatementsPerConnection" value="0" />
<!-- rollback uncommited changes on close -->
<property name="autoCommitOnClose" value="false" />
</bean>
Thanks,
Sam
On Thu, Mar 30, 2017 at 8:53 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:
> On Thu, Mar 30, 2017 at 2:28 PM, <sam(dot)dai(at)servicemax(dot)com> wrote:
> > I have a java application that uses postgresSQL 9.6.1, found the memory
> > usage continue to increase over time, the details is as below:
> > (1) At the beginning, the memory usage is Postgresql is 178.3 MB.
> > (2) Run performance testing(concurrent user 1800) on this application,
> when
> > active user is 1800 in performance testing, the memory usage of this
> > Postgresql is 1.413 GB. After the performance testing is finished, the
> > memory usage of this Postgresql is 344.1 MB.
> > (3) Wait for 8 hours and don't do anything on this application during
> this
> > time, the memory usage of this container is 360.2 MB after 8 hours. Even
> I
> > restart this application and wait for 2 hours, the memory usage of this
> > Postgresql is 350 MB.
> > (4)Run this performance testing for 20 times in 20 days, found memory
> usage
> > of this Postgresql is 3.5 GB. If restart Postgres, the memory usage will
> > back to about 178.3 MB.
> >
> > It looks like the memory usage of Postgres increases every time we run
> > performance testing, not sure if it's a bug or not.
>
> Are you keeping connections to the server alive for a long time? This
> may be a sign of syscache bloat.
> --
> Michael
>
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-03-30 13:32:37 | Re: BUG #14606: Memory usage continue to increase |
Previous Message | Michael Paquier | 2017-03-30 12:53:14 | Re: BUG #14606: Memory usage continue to increase |