pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: Honza Novak <kacerr@developers.zlutazimnice.cz>
Cc: pgsql-performance@postgresql.org
Subject: Re: multiple apaches against single postgres database
Date: Wed, 24 Oct 2007 14:17:22 +0100
Message-ID: <87r6jkslct.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <471F3752.8070205@developers.zlutazimnice.cz>
References: <471F3752.8070205@developers.zlutazimnice.cz>

"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



view thread (6+ messages)  latest in thread

Message-ID: <87r6jkslct.fsf@oxford.xeocode.com>
Permalink:  ../87r6jkslct.fsf@oxford.xeocode.com/
Also on:    postgresql.org/message-id/87r6jkslct.fsf@oxford.xeocode.com

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: stark@enterprisedb.com, kacerr@developers.zlutazimnice.cz
  Subject: Re: multiple apaches against single postgres database
  In-Reply-To: <87r6jkslct.fsf@oxford.xeocode.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