Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id DFC696327D0 for ; Fri, 9 Jul 2010 00:11:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 12428-09 for ; Fri, 9 Jul 2010 03:11:12 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.4.227.11]) by mail.postgresql.org (Postfix) with ESMTP id 55BDD632769 for ; Fri, 9 Jul 2010 00:11:12 -0300 (ADT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id BB56F7924C; Fri, 9 Jul 2010 11:11:10 +0800 (WST) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 3A0A2AEB3C; Fri, 9 Jul 2010 11:09:28 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WIRYYJ11JGK4; Fri, 9 Jul 2010 11:09:23 +0800 (WST) Received: from [10.1.1.3] (124-168-255-56.dyn.iinet.net.au [124.168.255.56]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id E9890AE516; Fri, 9 Jul 2010 11:09:22 +0800 (WST) Message-ID: <4C369346.6010501@postnewspapers.com.au> Date: Fri, 09 Jul 2010 11:11:02 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Harpreet singh Wadhwa CC: pgsql-performance@postgresql.org Subject: Re: Need help in performance tuning. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.51 tagged_above=-10 required=5 tests=BAYES_05=-0.5, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/141 X-Sequence-Number: 39530 On 9/07/2010 3:20 AM, Harpreet singh Wadhwa wrote: > Hi, > > > I want to fine tune my postgresql to increase number of connects it > can handle in a minutes time. > Decrease the response time per request etc. > The exact case will be to handle around 100 concurrent requests. If you're not using a connection pool, start using one. Do you really need 100 *active* working query threads at one time? Because if you do, you're going to need a scary-big disk subsystem and a lot of processors. Most people actually only need a few queries executing simultaneously, they just need lots of connections to the database open concurrently and/or lots of queries queued up for processing. For that purpose, a connection pool is ideal. You will get BETTER performance from postgresql with FEWER connections to the "real" database that're all doing active work. If you need lots and lots of connections you should use a connection pool to save the main database the overhead of managing that. -- Craig Ringer