Server side backend permanent session memory usage ?

Поиск
Список
Период
Сортировка
От Day, David
Тема Server side backend permanent session memory usage ?
Дата
Msg-id 401084E5E73F4241A44F3C9E6FD79428037C48F2DD@exch-01
обсуждение исходный текст
Ответы Re: Server side backend permanent session memory usage ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Begin Daniel
Дата:
Сообщение: Re: Merging timeseries in postgres
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Server side backend permanent session memory usage ?