Re: Suggested change to pgbench - Mailing list pgsql-patches

From Tatsuo Ishii
Subject Re: Suggested change to pgbench
Date
Msg-id 20021007.140425.78704131.t-ishii@sra.co.jp
Whole thread Raw
In response to Suggested change to pgbench  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
I have applied your patches plus an fprintf to see if PQisBusy()
actually returns true. Then ran pgbench with -c 128 -t 100. So far I
could not see any evidence that PQisBusy() returns true.

> I think pgbench is not dealing with asynchronous input quite right.
> As written, if the backend sends a response that doesn't fit into
> a single TCP packet, pgbench will go into a tight loop of
> PQisBusy/PQconsumeInput, which will not exit until the rest of the
> response arrives.  This would degrade the reported performance, first
> because of the wasted CPU cycles, and second because other connections
> wouldn't get serviced during that interval.

> I haven't done enough tests to be sure that that isn't just a chance
> variation, but I recommend changing the code as below anyway.

Ok, I will commit your changes. Thanks.
--
Tatsuo Ishii

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Suggested change to pgbench
Next
From: Justin Clift
Date:
Subject: Re: Suggested change to pgbench