Re: [PATCH] add --throttle option to pgbench [patch 2]

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] add --throttle option to pgbench [patch 2]
Date: 2013-04-29 22:39:44
Message-ID: alpine.DEB.2.02.1304300026540.17961@localhost6.localdomain6
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> It does seem to me that we should Poissonize the throttle time, then
> subtract the average overhead, rather than Poissonizing the difference.

After thinking again about Jeff's point and failing to sleep, I think that
doing exactly that is better because:
- it is "right"
- the code is simpler and shorter
- my transaction stuck sequence issue is not that big an issue anyway

Here is a patch to schedule transactions along Poisson-distributed events.
This patch replaces my previous proposal.

Note that there is no reference to the current time after the stochastic
process is initiated. This is necessary, and mean that if transactions lag
behind the throttle at some point they will try to catch up later. Neither
a good nor a bad thing, mostly a feature.

--
Fabien

Attachment Content-Type Size
pgbench-throttle-2.patch text/x-diff 6.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2013-04-29 22:54:49 Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Previous Message Josh Berkus 2013-04-29 22:03:42 Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken