Server side backend permanent session memory usage ? - Mailing list pgsql-general

From Day, David
Subject Server side backend permanent session memory usage ?
Date
Msg-id 401084E5E73F4241A44F3C9E6FD79428037C48F2DD@exch-01
Whole thread Raw
Responses Re: Server side backend permanent session memory usage ?
List pgsql-general

Hi,

 

 

There seems to be an unbounded growth of  memory usage by the backend postgres process representing a “permanent” session in our system. 

 

The size/res values retrieved by running  the “top”  utility seem to exceed the amount I would expect given the mem and buf tuning parameters of the postgresql.conf file. ( Though, I find a  theoretical maximum session value formula  a bit difficult value to nail down from the documentation.  )  

 

I have seen other reported issues regarding session backend memory usage  in stack-overflow and the workaround has amounted to periodically, dropping and restoring the pools connection.  Otherwise over time ( many days ) the connections backends,  collectively keep accumulating memory,  swap space starts coming into play and the system performance takes a big hit.

 

I have implanted the session refresh concept and begun testing for improvement, but at least wanted to report this and get some feedback on my apparent lack of understanding on what is going on under the hood here ?

 

Some system notes:

FreeBSD 10.x

Postgres 9..3.5 and 9.5 systems

Hardware 2 Gig/2 core  and 4 Gig /4 core Memory

 

There are no memory related errors  reported in system logs or postgres logs.

There are no outstanding uncommitted transactions.  ( per pgadminIII views )

The load offered is a very regular set of queries distributed against 5 – 10  “permanent” sessions for processing a VoIP softswitch.

I have played around with adjusting the work_mem and shared buffers up and down with no impact on the memory growth observation.

 

On initial session  connection the  “top” utility  would report on the order of 220M/38000K  (SIZE/RES) memory connection.

After 4 days of operation the same session will indicate  516M/300M.

 

 

Thank you for any insights or suggestions on how to better analyze what is transpiring.

 

 

Best Regards

 

 

Dave Day

 

 

 

 

 

 

 

 

 

 

pgsql-general by date:

Previous
From: Begin Daniel
Date:
Subject: Re: Merging timeseries in postgres
Next
From: Tom Lane
Date:
Subject: Re: Server side backend permanent session memory usage ?