pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Wolfe <nw@codon.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Question on hardware & server capacity
Date: Thu, 02 Jan 2003 14:57:34 -0500
Message-ID: <3255.1041537454@sss.pgh.pa.us> (raw)
In-Reply-To: <008701c2b286$4c9c2ae0$88693fd1@WEASEL>
References: <008701c2b286$4c9c2ae0$88693fd1@WEASEL>

"Steve Wolfe" <nw@codon.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



view thread (8+ messages)  latest in thread

Message-ID: <3255.1041537454@sss.pgh.pa.us>
Permalink:  ../3255.1041537454@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3255.1041537454@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, nw@codon.com
  Subject: Re: Question on hardware & server capacity
  In-Reply-To: <3255.1041537454@sss.pgh.pa.us>
  References: <008701c2b286$4c9c2ae0$88693fd1@WEASEL> <3255.1041537454@sss.pgh.pa.us>

* 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