Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c

From: Joe Conway <mail(at)joeconway(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Denis A Ustimenko <denis(at)oldham(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: droped out precise time calculations in src/interfaces/libpq/fe-connect.c
Date: 2002-10-16 05:15:27
Message-ID: 3DACF5EF.80602@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
> Patch applied. I am applying it so it is in CVS and everyone can see
> it. I will keep modifying it until everyone likes it. It is just
> easier to do it that way when multiple people are reviewing it. They
> can jump in and make changes too.

I ran the same test as before, with the following results:

current cvs
-----------
good connect info, using hostaddr, timeout = 1 second
=====================================================
unsuccessful 0 times: avg n/a
successful 50000 times: avg 0.0087

bad connect info, using hostaddr, timeout = 1 second
====================================================
unsuccessful 100 times: avg 1.4998
successful 0 times: sum 0: avg n/a

Seems to work well. But one slight concern:

with previous 2 line patch
--------------------------
good connect info, using hostaddr, timeout = 1 || 2 second(s)
=============================================================
unsuccessful 0 times: avg n/a
successful 20000 times: avg 0.0074

These tests were on the same, otherwise unloaded development box. Not sure if
it is an artifact or not, but the average connection time has gone from 0.0074
to 0.0087, an increase of about 17%. Also worth noting is that there was very
little deviation from connect-to-connect on both of the tests (eye-balled the
total range at about 0.0003). I did not bother calculating standard deviation
of the connect times, but I'm certain it would not be enough to account for
the difference. Could anything in Bruce's patch account for this, or do you
think it is normal variation due to something on my dev box?

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anuradha Ratnaweera 2002-10-16 05:21:22 Re: Postgresql and multithreading
Previous Message Bruce Momjian 2002-10-16 04:59:57 Re: Postgresql and multithreading