Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id F100C476B06 for ; Thu, 2 Jan 2003 15:05:53 -0500 (EST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 3CB0B4769FF for ; Thu, 2 Jan 2003 14:57:36 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.6/8.12.6) with ESMTP id h02JvY0U003256; Thu, 2 Jan 2003 14:57:35 -0500 (EST) To: "Steve Wolfe" Cc: pgsql-performance@postgresql.org Subject: Re: Question on hardware & server capacity In-reply-to: <008701c2b286$4c9c2ae0$88693fd1@WEASEL> References: <008701c2b286$4c9c2ae0$88693fd1@WEASEL> Comments: In-reply-to "Steve Wolfe" message dated "Thu, 02 Jan 2003 10:42:05 -0700" Date: Thu, 02 Jan 2003 14:57:34 -0500 Message-ID: <3255.1041537454@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/6 X-Sequence-Number: 653 "Steve Wolfe" 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