Am Mittwoch, 4. August 2004 14:45 schrieb Paul Serby:
> Apache on the Web server can take up to 300 connections and PHP is using
> Postgres is set with the following.
> max_connections = 300
> shared_buffers = 38400
> sort_mem = 12000
> But Apache is still maxing out the non-super user connection limit.
for most websites 300 connections is far too much (imagine even 10 request per
second for 10 hours a day ends up to 10.8 Mio pages a month)
but anyway: you should first focus on closing your http connection to the user
as fast as possible. then you dont need so much concurrent connections which
keep db connections open and uses memory.
I did the following:
- apache: keepalive off
- apache patch: lingerd (google for it)
- apache mod_gzip
this keeps your http connection as short as possible, so the apache child is
ready to serve the next client.
Imagine 5 seconds of keepalive 1 second on lingering half-closed tcp
connections and 4 more seconds for transport of uncompressed content.
in this scenario your apache child uses memory an your pooled db connection
for 10 seconds while doing nothing!
in my experience apache in standard configuration can be the main bottleneck.
and teh combination of keepalive off, lingerd and mod_gzip is GREAT and i
didn't found much sites propagating a configuration like this.
p.s: sorry for being slightly off topic and talking about apache but when it
comes to performance it is always important to look at the complete system.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly