Re: [PATCH] pgbench --throttle (submission 7 - with lag measurement)

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Greg Smith <greg(at)2ndQuadrant(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pgbench --throttle (submission 7 - with lag measurement)
Date: 2013-07-14 21:42:41
Message-ID: alpine.DEB.2.02.1307142231060.3991@localhost6.localdomain6
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Greg,

> Correct patch (and the little one from me again) attached this time.

Please find an updated v15 with only comment changes:

* The new comment about "is_throttled" was inverted wrt the meaning of the
variable, at least to my understanding.

* ISTM that the impact of the chosen 1000 should appear somewhere.

* The trans_need_throttle comment was slightly wrong: the first
transaction is also throttled, when initially entering doCustom.

About 123456 12345 vs 123456.012345: My data parser is usually "gnuplot"
or "my eyes", and in both cases the later option is better:-)

About the little patch: Parameter "ok" should be renamed to something
meaningful (say "do_finish"?). Also, it seems that when timer is exceeded
in doCustom it is called with true, but maybe you intended that it should
be called with false?? Moreover, under normal circumstances (throttling is
significantly below the maximum rate) PQfinish will be called directly by
threadRun while interrupting sleeping threads. Also, it is important to
remove the connection because it serves as a marker to know whether a
client must run or not. So basically I do not understand how it works.
Note that it does not mean that it does not work, it just means that I do
not really understand:-)

--
Fabien.

Attachment Content-Type Size
pgbench-throttle-v15.patch text/x-diff 12.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2013-07-14 21:59:15 Re: Improvement of checkpoint IO scheduler for stable transaction responses
Previous Message james 2013-07-14 21:28:50 Re: Improvement of checkpoint IO scheduler for stable transaction responses