Re: pgbench stats per script & other stuff

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Date: 2016-03-20T06:39:16Z
Lists: pgsql-hackers
Hello Jeff,

> So I wanted to do something like:
>
> for f in `seq 0 5 100`; do
>  pgbench -T 180 -c8 -j8 -b tpcb-like@$f -b select-only@100
> done;
>
> But, I'm not allowed to specify a weight of zero.

Indeed. I did not envision such a use case, but it is quite legitimate and 
interesting! I would hope that the behavior would be a linear combination 
of the raw performance of each script, but whether it is indeed the case 
is not that sure.

> Would this be a welcome change?

Speaking for myself, I would be fine with such a change, provided:

  - that it does work:-) I'm not sure what happens by the script selection
    process, it should be checked carefully because it was not designed
    with allowing a zero weight, and it may depend on its/their positions.
    It may already work, but it really needs checking.

  - I would suggest that a warning is shown when a weight is zero,
    something like "warning, script #%d weight is zero, will be ignored".

  - the documentation should be updated:-)

-- 
Fabien


Commits

  1. pgbench: Allow changing weights for scripts