Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4C30C6325EB for ; Thu, 2 Sep 2010 13:13:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 14942-09 for ; Thu, 2 Sep 2010 16:13:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from n5-vm1.bullet.mail.gq1.yahoo.com (n5-vm1.bullet.mail.gq1.yahoo.com [67.195.8.63]) by mail.postgresql.org (Postfix) with SMTP id 6D7346321C0 for ; Thu, 2 Sep 2010 13:13:01 -0300 (ADT) Received: from [67.195.9.83] by n5.bullet.mail.gq1.yahoo.com with NNFMP; 02 Sep 2010 16:13:00 -0000 Received: from [98.137.27.216] by t3.bullet.mail.gq1.yahoo.com with NNFMP; 02 Sep 2010 16:12:59 -0000 Received: from [127.0.0.1] by omp126.mail.gq1.yahoo.com with NNFMP; 02 Sep 2010 16:12:59 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 879229.29408.bm@omp126.mail.gq1.yahoo.com Received: (qmail 89922 invoked by uid 60001); 2 Sep 2010 16:12:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1283443979; bh=5Hl3SrQDdF4++FFiZPg3bLKxA8SNDUm94RwRXFr2y/U=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=W/+K7qfccS2l6Dicp7HGrqBO60Pf+fhvChAPaAr4auBCky06SwKTMPFDBv7Zau7tAdaDg0yvwPU45Q5dzz2ii07txezEXgrhr2F/bcWjQADZMzQ1s8c82kH9M+vXDRaUjD/cO4itAilFmAnm1Y9eEhyulnHUI+x0TvA4niYo6LE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=jB7uLAxt6A0ttu49dXdCqmZcb6y9blnSyu23doQ+PVB1fRHzTRMupcY+MDSSPFFfLyZHXERpwTYnaNBx5IykEsbQCV041VZPeqEWlkrPi8FUnRo1PdB2hLgpp23oemgW+OpLfhGXMwbZzg+TvWZkJrAN0SAjAXr7lR82buqV9vo=; Message-ID: <529329.89885.qm@web120007.mail.ne1.yahoo.com> X-YMail-OSG: CxQ_zQwVM1lEvWZ_cScUFHszss6O6_aZsRT7V5itCl1spv8 MLhVKunyKKuw8gYgBOS4f3370s0XAaj5v_Ppuy9mIOyxrKVl1I6gvCfBQUoa JQ4Eu2O02PaUXq2eFisPIEHn_m65zwes_PSoZnag2Hyn3JxsiPeZbbIFCQPf NGSruWt0KSPEaJ0pWG82xbzNZxXtVpmPaqG1U_wxfzts05WcnD6JN8Z9DsR7 fuoc9rMQonvsE7GfBwA-- Received: from [68.36.215.11] by web120007.mail.ne1.yahoo.com via HTTP; Thu, 02 Sep 2010 09:12:59 PDT X-Mailer: YahooMailRC/470 YahooMailWebService/0.8.105.279950 References: <788866.21140.qm@web120020.mail.ne1.yahoo.com> <4C7D00330200002500034ED2@gw.wicourts.gov> <19320.56933.qm@web120013.mail.ne1.yahoo.com> Date: Thu, 2 Sep 2010 09:12:59 -0700 (PDT) From: A J Subject: Re: Confused by 'timing' results To: Scott Marlowe Cc: Kevin Grittner , pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-503636566-1283443979=:89885" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/15 X-Sequence-Number: 35559 --0-503636566-1283443979=:89885 Content-Type: text/plain; charset=us-ascii 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 To: A J Cc: Kevin Grittner ; pgsql-admin@postgresql.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 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)" --0-503636566-1283443979=:89885 Content-Type: text/html; charset=us-ascii
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.marlowe@gmail.com>
To: A J <s5aly@yahoo.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-admin@postgresql.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@yahoo.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)"

--0-503636566-1283443979=:89885--