Re: pgbench with large scale factor

Lists: pgsql-hackers
From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pgbench with large scale factor
Date: 2013-12-12 02:41:43
Message-ID: 20131212.114143.2213873212778986616.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I noticed that "pgbench -s scale_factor" where scale_factor is larger
than 20,000 (SCALE_32BIT_THRESHOLD) creates pgbench_accounts table containing
0 row without any complain. Is there any reason for this?

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench with large scale factor
Date: 2013-12-12 02:49:38
Message-ID: 20131212.114938.1450785936337099662.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> I noticed that "pgbench -s scale_factor" where scale_factor is larger
> than 20,000 (SCALE_32BIT_THRESHOLD) creates pgbench_accounts table containing
> 0 row without any complain. Is there any reason for this?

Oops. It appeared that this was a bug prior 9.3 pgbench. Sorry for noise.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench with large scale factor
Date: 2013-12-12 03:42:52
Message-ID: 20131212.124252.186879813324087460.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

>> I noticed that "pgbench -s scale_factor" where scale_factor is larger
>> than 20,000 (SCALE_32BIT_THRESHOLD) creates pgbench_accounts table containing
>> 0 row without any complain. Is there any reason for this?
>
> Oops. It appeared that this was a bug prior 9.3 pgbench. Sorry for noise.

BTW, I saw this with 9.3.2's pgbench:

239300000 of 3800000000 tuples (-48%) done (elapsed 226.86 s, remaining -696.10 s).

-48% does not seem to be quite correct to me...

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp


From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench with large scale factor
Date: 2013-12-12 06:28:30
Message-ID: 20131212.152830.936416898122498135.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> BTW, I saw this with 9.3.2's pgbench:
>
> 239300000 of 3800000000 tuples (-48%) done (elapsed 226.86 s, remaining -696.10 s).
>
> -48% does not seem to be quite correct to me...

Included is a proposed fix for this (also fixing weired "remaining"
part). If there's no objection, I will commit it.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

Attachment Content-Type Size
pgbench.c.patch text/x-patch 810 bytes

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench with large scale factor
Date: 2013-12-12 07:02:41
Message-ID: alpine.DEB.2.10.1312120801280.11842@sto
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Hello Tatsuo,

>> BTW, I saw this with 9.3.2's pgbench:
>>
>> 239300000 of 3800000000 tuples (-48%) done (elapsed 226.86 s, remaining -696.10 s).
>>
>> -48% does not seem to be quite correct to me...
>
> Included is a proposed fix for this (also fixing weired "remaining"
> part). If there's no objection, I will commit it.

Looks ok, but I would consider switching to "double" instead of "int64".

--
Fabien.


From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: coelho(at)cri(dot)ensmp(dot)fr
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench with large scale factor
Date: 2013-12-12 07:28:31
Message-ID: 20131212.162831.577821376157686362.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Fabien,

>> Included is a proposed fix for this (also fixing weired "remaining"
>> part). If there's no objection, I will commit it.
>
> Looks ok, but I would consider switching to "double" instead of
> "int64".

Assuming you are talking about "remaining sec" part, I agree. Here is
the revised patch.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

Attachment Content-Type Size
unknown_filename text/plain 811 bytes

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: coelho(at)cri(dot)ensmp(dot)fr
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench with large scale factor
Date: 2013-12-12 10:15:25
Message-ID: 20131212.191525.2215708416933584523.t-ishii@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Fabien,
>
>>> Included is a proposed fix for this (also fixing weired "remaining"
>>> part). If there's no objection, I will commit it.
>>
>> Looks ok, but I would consider switching to "double" instead of
>> "int64".
>
> Assuming you are talking about "remaining sec" part, I agree. Here is
> the revised patch.

Done.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp