Re: [PERFORM] Are many idle connections bad?

2015-07-25 Thread Jeff Janes
On Sat, Jul 25, 2015 at 7:50 AM, Craig James wrote: > The canonical advice here is to avoid more connections than you have CPUs, > and to use something like pg_pooler to achieve that under heavy load. > > We are considering using the Apache mod_perl "fast-CGI" system and perl's > Apache::DBI modu

Re: [PERFORM] Are many idle connections bad?

2015-07-25 Thread Craig James
On Sat, Jul 25, 2015 at 8:04 AM, Tom Lane wrote: > Craig James writes: > > ... This would result in a thousand > > or so Postgres connections on a machine with 32 CPUs. > > > So the question is: do idle connections impact performance? > > Yes. Those connections have to be examined when gatherin

Re: [PERFORM] Are many idle connections bad?

2015-07-25 Thread Tom Lane
Craig James writes: > ... This would result in a thousand > or so Postgres connections on a machine with 32 CPUs. > So the question is: do idle connections impact performance? Yes. Those connections have to be examined when gathering snapshot information, since you don't know that they're idle

[PERFORM] Are many idle connections bad?

2015-07-25 Thread Craig James
The canonical advice here is to avoid more connections than you have CPUs, and to use something like pg_pooler to achieve that under heavy load. We are considering using the Apache mod_perl "fast-CGI" system and perl's Apache::DBI module, which caches persistent connections in order to improve per