Re: Confused by 'timing' results

From: A J <s5aly(at)yahoo(dot)com>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Confused by 'timing' results
Date: 2010-09-02 16:12:59
Message-ID: 529329.89885.qm@web120007.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I am conducting the test with several concurrent clients.
The problem I am now facing in using log_min_duration_statement is that all the
clients have to write to a single log file in the pg_log directory. So they have
to wait for the other writes to happen before completing their write. This seems
to be reason why the measured duration in the log file (for several concurrent
clients) is way more, infact much more than what was measured by psql timing
from the client side.

(The problem with ssh tunnel and then psql on database server is that the
database will think the connections are local. I want to mimic real-life where
the tcp connections are opened directly by clients from different IPs.)

related settings:
log_destination = 'stderr' # Valid values are combinations of
#log_directory = 'pg_log' # directory where log files are written,
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,

________________________________
From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: A J <s5aly(at)yahoo(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>; pgsql-admin(at)postgresql(dot)org
Sent: Tue, August 31, 2010 4:02:33 PM
Subject: Re: [ADMIN] Confused by 'timing' results

On Tue, Aug 31, 2010 at 1:01 PM, A J <s5aly(at)yahoo(dot)com> wrote:
> OK, thanks Kevin. So to measure just the time take by database server, I
> guess I need to set the log_min_duration_statement and log_statement
> parameters in postgresql.conf
> log_min_duration_statement output should stay constant for all the different
> clients across different geographic locations.

Also, if you want to test turn around time without the disk drives
being an issue, you can do "select 1" instead of "select * from table
(yada)"

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2010-09-02 16:48:58 Re: Confused by 'timing' results
Previous Message Tom Lane 2010-09-02 15:09:02 Re: out of memory error