Re: pgbench cpu overhead (was Re: lazy vxid locks, v1)

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgbench cpu overhead (was Re: lazy vxid locks, v1)
Date: 2011-06-14 01:56:13
Message-ID: 4DF6BFBD.9040801@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/13/2011 08:27 PM, Jeff Janes wrote:
> pgbench sends each query (per connection) and waits for the reply
> before sending another.
>
> Do we know whether sysbench does that, or if it just stuffs the
> kernel's IPC buffer full of queries without synchronously waiting for
> individual replies?
>

sysbench creates a thread for each client and lets them go at things at
whatever speed they can handle. You have to setup pgbench with a worker
per core to get them even close to level footing. And even in that
case, sysbench has a significant advantage, because it's got the
commands it runs more or less hard-coded in the program. pgbench is
constantly parsing things in its internal command language and then
turning them into SQL requests. That's flexible and allows it to be
used for some neat custom things, but it uses a lot more resources to
drive the same number of clients.

> I can't get sysbench to "make" for me, or I'd strace in single client
> mode and see what kind of messages are going back and forth.
>

If you're using a sysbench tarball, no surprise. It doesn't build on
lots of platforms now. If you grab
http://projects.2ndquadrant.it/sites/default/files/bottom-up-benchmarking.pdf
it has my sysbench notes starting on page 34. I had to checkout the
latest version from their development repo to get it to compile on any
recent system. The attached wrapper script may be helpful to you as
well to help get over the learning curve for how to run the program; it
iterates sysbench over a number of database sizes and thread counts
running the complicated to setup OLTP test.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.us

Attachment Content-Type Size
oltp-read text/plain 1.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-06-14 01:57:49 Re: Why polecat and colugos are failing to build back branches
Previous Message Alvaro Herrera 2011-06-14 01:54:38 Re: Creating new remote branch in git?