#2: Re: pgBouncer for connection pooling
Posted on 2010-08-23 18:02:31 by Joshua Drake
On Mon, 2010-08-23 at 14:38 +0000, Kieren Scott wrote:
> 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...?
We use it in both on separate boxes as well as local. As long as your
machine is handling the connection processing of the pooler fine, I
wouldn't worry about it. There are some specific high end off machine
things you can do (point at different databases on different machines
from a single pooler) that is cool but for just a Drupal website it is
probably not required.
JD
--
PostgreSQL.org Major Contributor
Command Prompt, Inc: http://www.commandprompt.com/ - 509.416.6579
Consulting, Training, Support, Custom Development, Engineering
http://twitter.com/cmdpromptinc | http://identi.ca/commandprompt
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Report this message |
#4: Re: pgBouncer for connection pooling
Posted on 2010-08-24 06:15:34 by Benjamin Krajmalnik
This is a multi-part message in MIME format.
------_=_NextPart_001_01CB4343.6B86B8F4
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
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.
=20
=20
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
=20
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.
------_=_NextPart_001_01CB4343.6B86B8F4
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
..MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DWordSection1>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>I have pgbouncer running on the same server, and I get =
over 2000
calls to a php page per minute.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Each call does inserts data digests into partitioned =
tables.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>I also have a multi-threaded daemon connected to the same
database running background operations on the data coming =
in.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>Works flawlessly.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>BTW, 20 connections is not a heavy load at =
all.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'>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.<o:p></o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'><o:p> </o:p></span></p>
<p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri","sans-serif" ;
color:#1F497D'><o:p> </o:p></span></p>
<div style=3D'border:none;border-left:solid blue 1.5pt;padding:0in 0in =
0in 4.0pt'>
<div>
<div style=3D'border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt =
0in 0in 0in'>
<p class=3DMsoNormal><b><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' >From:</span>=
</b><span
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' >
pgsql-admin-owner@postgresql.org =
[mailto:pgsql-admin-owner@postgresql.org] <b>On
Behalf Of </b>Kieren Scott<br>
<b>Sent:</b> Monday, August 23, 2010 8:38 AM<br>
<b>To:</b> pgsql-admin@postgresql.org<br>
<b>Subject:</b> [ADMIN] pgBouncer for connection =
pooling<o:p></o:p></span></p>
</div>
</div>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal><span =
style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"' >Hi,<br>
<br>
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?<br>
<br>
How are other people using pgBouncer? E.g. on a separate server from the
database etc...?<br>
<br>
Thanks in advance.<o:p></o:p></span></p>
</div>
</div>
</body>
</html>
------_=_NextPart_001_01CB4343.6B86B8F4--
Report this message |