Re: Does idle sessions will consume more cpu and ram? If yes,how to control them

2018-12-19 Thread Tom Lane
Joshua White writes: > On Thu, 20 Dec 2018 at 14:35, Pavel Stehule wrote: >> čt 20. 12. 2018 v 2:41 odesílatel Ron napsal: >>> So it's best to kill connections that have been idle for a while? >> sure - one hour idle connection is too old. > I'd also assess closing the connection from the

Re: Does idle sessions will consume more cpu and ram? If yes,how to control them

2018-12-19 Thread Joshua White
On Thu, 20 Dec 2018 at 14:35, Pavel Stehule wrote: > čt 20. 12. 2018 v 2:41 odesílatel Ron napsal: > >> On 12/19/18 7:27 PM, Michael Paquier wrote: >> [snip] >> > Each backend stores its own copy of the relation cache, so if you have >> > idle connections which have been used for other work in

Re: Does idle sessions will consume more cpu and ram? If yes,how to control them

2018-12-19 Thread Pavel Stehule
čt 20. 12. 2018 v 2:41 odesílatel Ron napsal: > On 12/19/18 7:27 PM, Michael Paquier wrote: > [snip] > > Each backend stores its own copy of the relation cache, so if you have > > idle connections which have been used for other work in the past then > > the memory of those caches is still

Re: Does idle sessions will consume more cpu and ram? If yes,how to control them

2018-12-19 Thread Ron
On 12/19/18 7:27 PM, Michael Paquier wrote: [snip] Each backend stores its own copy of the relation cache, so if you have idle connections which have been used for other work in the past then the memory of those caches is still around. Idle connections also have a CPU cost in Postgres when

Re: Does idle sessions will consume more cpu and ram? If yes,how to control them

2018-12-19 Thread Michael Paquier
On Thu, Dec 20, 2018 at 11:32:22AM +1100, Joshua White wrote: >> In my application, the idle sessions are consuming cpu and ram. refer the >> ps command output. >> > > If you connect to the database, does select * from pg_stat_activity() show > a lot of idle connections? Each backend stores its

Re: Does idle sessions will consume more cpu and ram? If yes,how to control them

2018-12-19 Thread Joshua White
> > In my application, the idle sessions are consuming cpu and ram. refer the > ps command output. > If you connect to the database, does select * from pg_stat_activity() show a lot of idle connections?

Does idle sessions will consume more cpu and ram? If yes,how to control them

2018-12-17 Thread Raghavendra Rao J S V
In my application, the idle sessions are consuming cpu and ram. refer the ps command output. How idle session will consume more ram/cpu? How to control it? We are using Postgresql 9.2 with Centos 6 os. Please guide me. [image: image.png] -- Regards, Raghavendra Rao J S V Mobile- 8861161425