Re: Question on hardware & server capacity

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Steve Wolfe" <nw(at)codon(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Question on hardware & server capacity
Date: 2003-01-02 19:57:34
Message-ID: 3255.1041537454@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Steve Wolfe" <nw(at)codon(dot)com> writes:
> I logged some queries, and found that in an average second, the machine
> forks off 10 new backends, and responds to 50 selects and 3 updates.

So an average backend only processes ~ 5 queries before exiting?

> My feelings are that the machine is being swamped by both the number of
> context switches and the I/O, most likely the memory bandwidth.

I think you're getting killed by the lack of connection pooling.
Launching a new backend is moderately expensive: there's not just the
OS-level fork overhead, but significant cost to fill the catalog caches
to useful levels, etc.

7.3 has reduced some of those startup costs a little, so if you're still
on 7.2 then an update might help. But I'd strongly recommend getting
connection re-use in place before you go off and buy hardware.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-01-02 20:24:20 Re: join over 12 tables takes 3 secs to plan
Previous Message Hilmar Lapp 2003-01-02 19:42:02 join over 12 tables takes 3 secs to plan