Re: CPU costs of random_zipfian in pgbench

Fabien COELHO <coelho@cri.ensmp.fr>

From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Ants Aasma <ants.aasma@eesti.ee>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-22T16:17:40Z
Lists: pgsql-hackers

Attachments

>>> I also noticed that i is int in this function, but n is int64. That 
>>> seems like an oversight.
>
> Indeed, that is a bug!

Here is a v2 with hopefully better wording, comments and a fix for the bug 
you pointed out.

-- 
Fabien.

Commits

  1. Remove now-unnecessary thread pointer arguments in pgbench.

  2. Restrict pgbench's zipfian parameter to ensure good performance.