Re: CPU costs of random_zipfian in pgbench

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Georgios Kokolatos <gkokolatos(at)pm(dot)me>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: CPU costs of random_zipfian in pgbench
Date: 2019-04-01 21:39:05
Message-ID: 19055.1554154745@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
>> I was wondering about that too. It seems like it'd be a wise idea to
>> further constrain s and/or n to ensure that the s > 1 code path doesn't do
>> anything too awful ...

> Yep. The attached version enforces s >= 1.001, which avoids the worse cost
> of iterating, according to my small tests.

Seems reasonable. Pushed with minor documentation editing.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-04-01 21:51:35 Re: CPU costs of random_zipfian in pgbench
Previous Message Alvaro Herrera 2019-04-01 21:34:41 Re: Fix XML handling with DOCTYPE