Re: [PATCH] add --throttle option to pgbench [patch 2] - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: [PATCH] add --throttle option to pgbench [patch 2]
Date
Msg-id alpine.DEB.2.02.1304300026540.17961@localhost6.localdomain6
Whole thread Raw
In response to Re: [PATCH] add --throttle option to pgbench  (Jeff Janes <jeff.janes@gmail.com>)
List 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
issueis 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

pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken
Next
From: Noah Misch
Date:
Subject: Re: ALTER DEFAULT PRIVILEGES FOR ROLE is broken