Re: Persistent Connections in Webserver Environment

From: Hannes Dorbath <light(at)theendofthetunnel(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Persistent Connections in Webserver Environment
Date: 2005-05-02 16:17:26
Message-ID: 42764bc4$0$24312$8fe63b2a@news.disputo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 02.05.2005 17:41, Scott Marlowe wrote:

> But if the average PHP script takes 50 milliseconds to start up and 100 milliseconds to run, then either one is still pretty much noise.

Yeah, _IF_ :)
Our scripts reside precompiled in a bytecode cache so there just isn't
much start up time ;)

I just replaced the simple query with a real world one:

http://hannes.imos.net/real_world.txt

http://hannes.imos.net/pconnect.php
http://hannes.imos.net/connect.php

Refresh both a few times to get meaningful result.

Still factor 3-4. And this is one of the most complex queries we have --
and factor 3-4 just makes a differece for us :)

> Plus, neither benchmark is interesting really until you have pretty good parallel load running.

The scripts are on a production box with decent load.

> It may well be that pconnect makes a difference under heavier load. But most the time, I've seen one or two queries that could be tuned make a much larger difference than using pconnect.

We allways try to optimize and get most of performance from a query
anyway :)

> And, if you haven't got apache / postgresql configured properly and run out of connections, the connect time goes from 16 mS to hours as your users wait for you to fix the connectivity issues. :)

True, but we will test high load and will make sure that this won't
happen :)

--
imos Gesellschaft fuer Internet-Marketing und Online-Services mbH
Alfons-Feifel-Str. 9 // D-73037 Goeppingen // Stauferpark Ost
Tel: 07161 93339-14 // Fax: 07161 93339-99 // Internet: www.imos.net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Wheeler 2005-05-02 16:17:55 Re: [Dbdpg-general] Re: 'prepare' is not quite schema-safe
Previous Message Scott Marlowe 2005-05-02 15:41:26 Re: Persistent Connections in Webserver Environment