Re: pgbench - implement strict TPC-B benchmark

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - implement strict TPC-B benchmark
Date: 2019-08-06 06:58:45
Message-ID: alpine.DEB.2.21.1908060711340.26206@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Robert,

>> Ok, one thread cannot feed an N core server if enough client are executed
>> per thread and the server has few things to do.
>
> Right ... where N is, uh, TWO.

Yes, two indeed… For low-work cpu-bound load, given libpq & system
overheads, you cannot really hope for a better deal.

I think that the documentation could be clearer about thread/core
recommendations, i.e. how much ressources you should allocate to pgbench
so that the server is more likely to be the bottleneck, in the "Good
Practices" section.

>> The point I'm clumsily trying to make is that pgbench-specific overheads
>> are quite small: Any benchmark driver would have pretty much at least the
>> same costs, because you have the cpu cost of the tool itself, then the
>> library it uses, eg lib{pq,c}, then syscalls. Even if the first costs are
>> reduced to zero, you still have to deal with the database through the
>> system, and this part will be the same.
>
> I'm not convinced. Perhaps you're right; after all, it's not like
> pgbench is doing any real work.

Yep, pgbench is not doing much beyond going from one libpq call to the
next. It can be improved, but the overhead is already reasonably low.

> On the other hand, I've repeatedly been annoyed by how inefficient
> pgbench is, so I'm not totally prepared to concede that any benchmark
> driver would have the same costs, or that it's a reasonably
> well-optimized client application. When I run the pgbench, I want to
> know how fast the server is, not how fast pgbench is.

Hmmm. You cannot fully isolate components: You can only basically learn
how fast the server is when accessed through a libpq connection, which is
quite reasonable because this is what a user can expect anyway.

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-08-06 07:04:31 Re: pglz performance
Previous Message Peter Geoghegan 2019-08-06 06:39:14 Re: The unused_oids script should have a reminder to use the 8000-8999 OID range