Re: multiple apaches against single postgres database - Mailing list pgsql-performance

From Gregory Stark
Subject Re: multiple apaches against single postgres database
Date
Msg-id 87r6jkslct.fsf@oxford.xeocode.com
Whole thread Raw
In response to multiple apaches against single postgres database  (Honza Novak <kacerr@developers.zlutazimnice.cz>)
Responses Re: multiple apaches against single postgres database
List pgsql-performance
"Honza Novak" <kacerr@developers.zlutazimnice.cz> writes:

> Hi all,
> i'm looking for correct or at least good enough solution for use of multiple
> apaches with single postgres database. (apaches are 2.0.x, and postgres is
> 8.1.x)
>
> At this moment i'm involved in management of a website where we have large user
> load on our web servers.  Apaches are set up to be able to answer 300 requests
> at the same time and at the moment we have 4 apaches.

Do you have 300 processors? Are your requests particularly i/o-bound? Why
would running 300 processes simultaneously be faster than running a smaller
number sequentially? It doesn't sound like your systems are capable of
handling such a large number of requests simultaneously.

The traditional answer is to separate static content such as images which are
more i/o-bound onto a separate apache configuration which has a larger number
of connections, limit the number of connections for the cpu-bound dynamic
content server, and have a 1-1 ratio between apache dynamic content
connections and postgres backends. The alternative is to use connection
pooling. Often a combination of the two is best.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

pgsql-performance by date:

Previous
From: Jean-David Beyer
Date:
Subject: Re: 12 hour table vacuums
Next
From: "Giulio Cesare Solaroli"
Date:
Subject: Re: Finalizing commit taking very long