Re: pgBouncer for connection pooling - Mailing list pgsql-admin

From Kieren Scott
Subject Re: pgBouncer for connection pooling
Date
Msg-id BAY149-w113FE8974C781BF09F731EAE830@phx.gbl
Whole thread Raw
In response to Re: pgBouncer for connection pooling  ("Benjamin Krajmalnik" <kraj@servoyant.com>)
List pgsql-admin
Thanks Benjamin.
Most of the time the database only has 5-6 connections, however we occasionally get a flood of connections which can mean 60+ connections (when a company email is sent out with a link to a web page), so I'm looking to handle these spikes in connections as best I can :-)

Kieren


Subject: Re: [ADMIN] pgBouncer for connection pooling
Date: Mon, 23 Aug 2010 22:15:34 -0600
From: kraj@servoyant.com
To: kierenscott@hotmail.com; pgsql-admin@postgresql.org

.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';} .ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {color:blue;text-decoration:underline;} .ExternalClass a:visited, .ExternalClass span.ecxMsoHyperlinkFollowed {color:purple;text-decoration:underline;} .ExternalClass p {margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:'Times New Roman','serif';} .ExternalClass span.ecxEmailStyle18 {font-family:'Calibri','sans-serif';color:#1F497D;} .ExternalClass .ecxMsoChpDefault {font-size:10.0pt;} @page WordSection1 {size:8.5in 11.0in;} .ExternalClass div.ecxWordSection1 {page:WordSection1;}

I have pgbouncer running on the same server, and I get over 2000 calls to a php page per minute.

Each call does inserts data digests into partitioned tables.

I also have a multi-threaded daemon connected to the same database running background operations on the data coming in.

Works flawlessly.

BTW, 20 connections is not a heavy load at all.

In my application, pgbouncer has opened about 60 backends to handle the cases where I have a high oncurrency of data coming in at once, but usually the # non-idle connections is < 10.

 

 

From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Kieren Scott
Sent: Monday, August 23, 2010 8:38 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] pgBouncer for connection pooling

 

Hi,

I have a web-based application (drupal) which uses PHP to make connections to a back-end postgresql 8.3 server. The application and database are on separate servers, but as we can get 20+ concurrent connections on the database I've looked at pgBouncer to try and reduce the overhead of new connections on the database. I currently have pgBouncer running on the same server as my postgres database but I was wondering whether this is a recommended setup - are the performance benefits of using a connection pooler overshadowed by the overhead of running pgBouncer on the same server as the database?

How are other people using pgBouncer? E.g. on a separate server from the database etc...?

Thanks in advance.

pgsql-admin by date:

Previous
From: Kieren Scott
Date:
Subject: Re: Enterprise pg database monitoring
Next
From: Brad Nicholson
Date:
Subject: Re: Enterprise pg database monitoring