Re: [GENERAL] Re: [HACKERS] postgres processes

From: Karl DeBisschop <kdebisschop(at)spaceheater(dot)infoplease(dot)com>
To: rems(at)gdansk(dot)sprint(dot)pl
Cc: jwieck(at)debis(dot)com, pgsql-general(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Re: [HACKERS] postgres processes
Date: 1999-06-11 13:02:41
Message-ID: 199906111302.JAA29200@skillet.infoplease.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


From: Remigiusz Sokolowski <rems(at)gdansk(dot)sprint(dot)pl>
cc: pgsql-general(at)postgreSQL(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-pgsql-general(at)postgreSQL(dot)org
Precedence: bulk

> The defaults in the Apache configuration are
>
> StartServers 5
> MaxClients 256
> MinSpareServers 5
> MaxSpareServers 10
>
> This means, that at startup Apache will create 5 server
> processes that can handle requests simultaneously. When the
> site gets busy and some of them take longer to handle
> requests (especially scripting requests), it will start new
> servers (max one per second) until the limit of 256 parallel
> server processes is reached. If they finish their requests
> and become idle again, some of them get killed if there are
> more than 10 idle Apache processes.
>
> This is normally a good policy. It ensures that small file
> requests can still get served while some long running CGI's
> block their server process.

My problem is, that server is used not only as database server, but also
(and in general) as mail server - I think that tehre are some other
services too.
I've used persistent connections to database (and I think I now understand
why so big processor usage), so postgres processes haven't die after
serve requests but wait for another.
Hmm... I have one question more - every postgres process takes about 5% of
processor time ( I've used to measure top command ) - it is normal or may
be processor is too slow?
Rem

We use a similar configuration, and initially had similar problems.
We just don't use persistent connections in php anymore, and things
work fine - In our case, the number of reconnects saved by pconnect
would be small anyway.

Another strategy would be to start a second apache server on a
different port or different machine, use it only for redirects to the
pages that call postgres (assuming this is not your whole site). Then
throttle the second server back as described above (we haven't
actually done this - but it seems it should work).

--
Karl DeBisschop <kdebisschop(at)spaceheater(dot)infoplease(dot)com>
617.832.0332 (Fax: 617.956.2696)

Information Please - your source for FREE online reference
http://www.infoplease.com - Your Ultimate Fact Finder
http://kids.infoplease.com - The Great Homework Helper

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael A. Koerber 1999-06-11 20:52:38 Re: [GENERAL] PostgreSQL & r-trees
Previous Message Remigiusz Sokolowski 1999-06-11 11:45:57 Re: [HACKERS] postgres processes

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Bitmead 1999-06-11 13:12:56 Re: [HACKERS] BUG in 6.5 - GROUP BY inheritance
Previous Message Dmitry Samersoff 1999-06-11 12:55:43 UnixWare