Too frequent message of pgbench -i?
Currently pgbench -i prints following message every 10k tuples created.
fprintf(stderr, "%d tuples done.\n", j);
I think it's long time ago when the frequency of message seemed to be
appropriate because computer is getting so fast these days and every
10k message seems to be too often for me. Can we change the frequency
from 10k to 100k? Or should we make the frequency be adjustable from a
command line? Or even better, the frequency should be changed
automatically according to scale factor?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
On 20.06.2012 11:04, Tatsuo Ishii wrote:
Currently pgbench -i prints following message every 10k tuples created.
fprintf(stderr, "%d tuples done.\n", j);
I think it's long time ago when the frequency of message seemed to be
appropriate because computer is getting so fast these days and every
10k message seems to be too often for me. Can we change the frequency
from 10k to 100k? Or should we make the frequency be adjustable from a
command line? Or even better, the frequency should be changed
automatically according to scale factor?
Or print the message every n seconds, instead of every n lines. I think
a new command-line option would be overkill. I would be fine with just
bumping it to every 100k lines.
So +1 on doing something about it, not sure what.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
On Wed, Jun 20, 2012 at 4:04 AM, Tatsuo Ishii <ishii@postgresql.org> wrote:
Currently pgbench -i prints following message every 10k tuples created.
fprintf(stderr, "%d tuples done.\n", j);
I think it's long time ago when the frequency of message seemed to be
appropriate because computer is getting so fast these days and every
10k message seems to be too often for me. Can we change the frequency
from 10k to 100k?
+1 for doing it that way. I have an old patch lying around for that.
It's one line, which seems to be about as much work as the problem
justifies.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
pgbench-quiet.patchapplication/octet-stream; name=pgbench-quiet.patchDownload
diff --git a/contrib/pgbench/pgbench.c b/contrib/pgbench/pgbench.c
index 2d2e0f6..96cdf0f 100644
--- a/contrib/pgbench/pgbench.c
+++ b/contrib/pgbench/pgbench.c
@@ -1385,7 +1385,7 @@ init(void)
exit(1);
}
- if (j % 10000 == 0)
+ if (j % 100000 == 0)
fprintf(stderr, "%d tuples done.\n", j);
}
if (PQputline(con, "\\.\n"))
On Wed, Jun 20, 2012 at 4:04 AM, Tatsuo Ishii <ishii@postgresql.org> wrote:
Currently pgbench -i prints following message every 10k tuples created.
fprintf(stderr, "%d tuples done.\n", j);
I think it's long time ago when the frequency of message seemed to be
appropriate because computer is getting so fast these days and every
10k message seems to be too often for me. Can we change the frequency
from 10k to 100k?+1 for doing it that way. I have an old patch lying around for that.
It's one line, which seems to be about as much work as the problem
justifies.
+1. Your patch looks good.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
On Thu, Jun 21, 2012 at 3:44 AM, Tatsuo Ishii <ishii@postgresql.org> wrote:
On Wed, Jun 20, 2012 at 4:04 AM, Tatsuo Ishii <ishii@postgresql.org> wrote:
Currently pgbench -i prints following message every 10k tuples created.
fprintf(stderr, "%d tuples done.\n", j);
I think it's long time ago when the frequency of message seemed to be
appropriate because computer is getting so fast these days and every
10k message seems to be too often for me. Can we change the frequency
from 10k to 100k?+1 for doing it that way. I have an old patch lying around for that.
It's one line, which seems to be about as much work as the problem
justifies.+1. Your patch looks good.
Thanks, committed.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company