pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Balkrishna Sharma <b_ki@hotmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Parallel queries for a web-application |performance testing
Date: Wed, 16 Jun 2010 16:19:06 -0500
Message-ID: <4C18F97A02000025000324CD@gw.wicourts.gov> (raw)
In-Reply-To: <BAY149-w5365651952D598741FE4E1F0DE0@phx.gbl>
References: <BAY149-w5365651952D598741FE4E1F0DE0@phx.gbl>

Balkrishna Sharma <b_ki@hotmail.com> 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



view thread (6+ messages)  latest in thread

Message-ID: <4C18F97A02000025000324CD@gw.wicourts.gov>
Permalink:  ../4C18F97A02000025000324CD@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4C18F97A02000025000324CD@gw.wicourts.gov

 · 

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: Kevin.Grittner@wicourts.gov, b_ki@hotmail.com
  Subject: Re: Parallel queries for a web-application |performance testing
  In-Reply-To: <4C18F97A02000025000324CD@gw.wicourts.gov>
  References: <BAY149-w5365651952D598741FE4E1F0DE0@phx.gbl> <4C18F97A02000025000324CD@gw.wicourts.gov>

* 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