Re: PostgreSQL pre-fork speedup

From: Rod Taylor <pg(at)rbt(dot)ca>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostgreSQL pre-fork speedup
Date: 2004-05-05 18:12:58
Message-ID: 1083780778.60668.27.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2004-05-05 at 11:57, Greg Stark wrote:
> Rod Taylor <pg(at)rbt(dot)ca> writes:
>
> > Cutting that count down to 10 idlers in total by having PostgreSQL
> > prefork a specific database would make a significant difference.
>
> Well it would be 10 for each database. Since as has been pointed out before
> loading the database is most of the delay.
>
> If that's enough why not just run 10 apache processes instead of 100?

Because then we would need 10 times as many servers ;)

> I'm assuming the static non-database driven content is already separated onto
> other servers. In which case running 100 apache processes, most of which are
> idle is the source of the problem.

Most of it has been. It's the duty cycle. As stated in another email,
only about 20% of the work a script does is database related -- which
occurs all at one time. Even when all Apache backends are active, a
large number of connections will be idle but were used or will be used
at some point during the generation of that page.

It really is an Apache fault -- but I don't think it can be fixed within Apache itself.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-05-05 18:18:16 Re: Multiple Xids in PGPROC?
Previous Message Rod Taylor 2004-05-05 18:06:53 Re: PostgreSQL pre-fork speedup