Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 72609632F67 for ; Wed, 16 Jun 2010 18:19:18 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 86219-04 for ; Wed, 16 Jun 2010 21:19:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 29515632FD5 for ; Wed, 16 Jun 2010 18:19:11 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Wed, 16 Jun 2010 16:19:09 -0500 Message-Id: <4C18F97A02000025000324CD@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Wed, 16 Jun 2010 16:19:06 -0500 From: "Kevin Grittner" To: "Balkrishna Sharma" , Subject: Re: Parallel queries for a web-application |performance testing References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.311 tagged_above=-10 required=5 tests=BAYES_40=-0.001, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/303 X-Sequence-Number: 39159 Balkrishna Sharma wrote: > I wish to do performance testing of 1000 simultaneous read/write > to the database. You should definitely be using a connection pool of some sort. Both your throughput and response time will be better that way. You'll want to test with different pool sizes, but I've found that a size which allows the number of active queries in PostgreSQL to be somewhere around (number_of_cores * 2) + effective_spindle_count to be near the optimal size. > My question is:Am I losing something by firing these queries > directly off the server and should I look at firing the queries > from different IP address (as it would happen in a web application). If you run the client side of your test on the database server, the CPU time used by the client will probably distort your results. I would try using one separate machine to generate the requests, but monitor to make sure that the client machine isn't hitting some bottleneck (like CPU time). If the client is the limiting factor, you may need to use more than one client machine. No need to use 1000 different client machines. :-) -Kevin