pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mario Weilguni <roadrunner6@gmx.at>
To: pgsql-performance@postgresql.org
Subject: Re: Large number of short lived connections - could a connection pool help?
Date: Tue, 15 Nov 2011 09:04:52 +0100
Message-ID: <4EC21D24.3060804@gmx.at> (raw)
In-Reply-To: <CAPVp=gYKyQxy2D_3npH0WB313DPTGVao+BifXKKq_Mc7jA07bg@mail.gmail.com>
References: <CAPVp=gYKyQxy2D_3npH0WB313DPTGVao+BifXKKq_Mc7jA07bg@mail.gmail.com>

Am 15.11.2011 01:42, schrieb Cody Caughlan:
> We have anywhere from 60-80 background worker processes connecting to
> Postgres, performing a short task and then disconnecting. The lifetime
> of these tasks averages 1-3 seconds.
>
> I know that there is some connection overhead to Postgres, but I dont
> know what would be the best way to measure this overheard and/or to
> determine if its currently an issue at all.
>
> If there is a substantial overheard I would think that employing a
> connection pool like pgbouncer to keep a static list of these
> connections and then dole them out to the transient workers on demand.
>
> So the overall cumulative number of connections wouldnt change, I
> would just attempt to alleviate the setup/teardown of them so quickly.
>
> Is this something that I should look into or is it not much of an
> issue? Whats the best way to determine if I could benefit from using a
> connection pool?
>
> Thanks.
>
I had a case where a pooler (in this case pgpool) resulted in a 140% 
application improvement - so - yes, it is probably a win to use a 
pooling solution.





view thread (4+ messages)

Message-ID: <4EC21D24.3060804@gmx.at>
Permalink:  ../4EC21D24.3060804@gmx.at/
Also on:    postgresql.org/message-id/4EC21D24.3060804@gmx.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: roadrunner6@gmx.at
  Subject: Re: Large number of short lived connections - could a connection pool help?
  In-Reply-To: <4EC21D24.3060804@gmx.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox