Re: [HACKERS] pgbench progress report improvements - split 2

2013-09-25 Thread Noah Misch
On Tue, Sep 24, 2013 at 08:42:15PM +0200, Fabien COELHO wrote: >> meet all those goals simultaneously with simpler code, can we not? >> >> int64 wait = (int64) (throttle_delay * >> Min(7.0, -log(1 - pg_erand48(thread->random_state; > > If you truncate roughly t

Re: [HACKERS] pgbench progress report improvements - split 2

2013-09-24 Thread Fabien COELHO
Hello Noah, meet all those goals simultaneously with simpler code, can we not? int64 wait = (int64) (throttle_delay * Min(7.0, -log(1 - pg_erand48(thread->random_state; If you truncate roughly the multipler, as it is done here with "min", you nece

Re: [HACKERS] pgbench progress report improvements - split 2

2013-09-23 Thread Noah Misch
On Sun, Sep 22, 2013 at 08:46:55PM +0200, Fabien wrote: > pgbench: reduce and compensate throttling underestimation bias. > > This is a consequence of relying on an integer random generator, > which allow to ensure that delays inserted stay reasonably in > range of the target average delay. > > The

Re: [HACKERS] pgbench progress report improvements - split 2

2013-09-22 Thread Fabien
Split 2 of the initial submission pgbench: reduce and compensate throttling underestimation bias. This is a consequence of relying on an integer random generator, which allow to ensure that delays inserted stay reasonably in range of the target average delay. The bias was about 0.5% with 1000