From: Adam Lang <aalang@rutgersinsurance.com>
Cc: pgsql-php@postgresql.org
Subject: Re: persistent vs. non-persistent
Date: Thu, 4 Oct 2001 09:03:42 -0400
Message-ID: <009d01c14cd4$fe72d200$330a0a0a@rutgersinsurance.com> (raw)
References: <20011001213819.82F8B2AB46@bugs.unl.edu.ar>
<01a301c14ac2$908990d0$1e51000a@mitch>
<20011001225313.C81032AB46@bugs.unl.edu.ar>
<01d501c14acc$54b3d520$1e51000a@mitch>
<20011002112117.A31207@rakete.joerdens.de>
<1002018427.23146.17.camel@kant.mcmillan.net.nz>
In a way, it is a bit obvious because if you have a little amount of traffic
that child process for Apache are dieing frequently and not hanging around,
odds are you aren't doing enough traffic where persistent connections are
going to give you any noticeable speed improvement.
Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Andrew McMillan" <andrew@catalyst.net.nz>
To: "Frank Joerdens" <frank@joerdens.de>
Cc: <pgsql-php@postgresql.org>
Sent: Tuesday, October 02, 2001 6:27 AM
Subject: Re: [PHP] persistent vs. non-persistent
> Yes, I believe that is how it works. For a more reasonable approach to
> this problem you should look into (something like) DBBalancer (see
> SourceForge for more info).
>
> I have used persistent connections on one application and achieved a
> roughly 10x speed improvement, but you need to take a few things into
> consideration:
>
> Don't quit your Apache processes too quickly.
> - To get the full benefit of a persistent connection, it needs to hang
> around for a good number of requests. Make sure Apache isn't re-
> starting it's processes until they've done a thousand or so requests - I
> usually set it up to around 30,000 with no problems on Linux.
>
> Make sure you have enough RAM.
> - When things have reached some sort of 'steady state' you are likely
> to have a lot of processes running. You lose all benefit (and then
> some) if you are swapping.
> This could also be "Be careful about setting your maximums" because you
> can control this within Apache and PostgreSQL configurations to some
> extent.
>
> But this is where DBBalancer becomes a better approach. As a pool of
> database connections, you can get the benefit of (a), while still
> retaining a softer degradation under extreme demands. The downside is
> that you have to manage your transactions slightly more carefully, and
> you are susceptible to memory leak problems in the database client
> connection.
>
> These are not insurmountable problems. The upside is that DBBalancer
> also lets you make a fairly smooth transition to the _next_ level, where
> you have a load-balanced pool of replicated databases.
>
> Regards,
> Andrew.
>
> --
> --------------------------------------------------------------------
> Andrew @ Catalyst .Net.NZ Ltd, PO Box 11-053, Manners St, Wellington
> WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
> DDI: +64(4)916-7201 MOB: +64(21)635-694 OFFICE: +64(4)499-2267
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: aalang@rutgersinsurance.com
Subject: Re: persistent vs. non-persistent
In-Reply-To: <009d01c14cd4$fe72d200$330a0a0a@rutgersinsurance.com>
References: <20011001213819.82F8B2AB46@bugs.unl.edu.ar> <01a301c14ac2$908990d0$1e51000a@mitch> <20011001225313.C81032AB46@bugs.unl.edu.ar> <01d501c14acc$54b3d520$1e51000a@mitch> <20011002112117.A31207@rakete.joerdens.de> <1002018427.23146.17.camel@kant.mcmillan.net.nz> <009d01c14cd4$fe72d200$330a0a0a@rutgersinsurance.com>
* 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