Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id ADA0F6333A0 for ; Fri, 3 Apr 2009 23:36:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 66696-06 for ; Fri, 3 Apr 2009 23:36:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from westnet.com (westnet.com [216.187.52.2]) by mail.postgresql.org (Postfix) with ESMTP id 02F5F632540 for ; Fri, 3 Apr 2009 23:36:01 -0300 (ADT) Received: from westnet.com (localhost [127.0.0.1]) by westnet.com (8.14.0/8.14.0) with ESMTP id n342Zxki029493; Fri, 3 Apr 2009 22:35:59 -0400 (EDT) Received: from localhost (gsmith@localhost) by westnet.com (8.14.0/8.13.2/Submit) with ESMTP id n342Zwsa029490; Fri, 3 Apr 2009 22:35:58 -0400 (EDT) X-Authentication-Warning: westnet.com: gsmith owned process doing -bs Date: Fri, 3 Apr 2009 22:35:58 -0400 (EDT) From: Greg Smith X-X-Sender: gsmith@westnet.com To: Tom Lane cc: David Kerr , pgsql-performance@postgresql.org Subject: Re: Question on pgbench output In-Reply-To: <24809.1238799146@sss.pgh.pa.us> Message-ID: References: <20090403195302.GA54342@mr-paradox.net> <24809.1238799146@sss.pgh.pa.us> User-Agent: Alpine 2.01 (GSO 1184 2008-12-16) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/94 X-Sequence-Number: 33461 On Fri, 3 Apr 2009, Tom Lane wrote: > However, I don't think anyone else has been pgbench'ing transactions > where client-side libpq has to absorb (and then discard) a megabyte of > data per xact. I wouldn't be surprised that that eats enough CPU to > make it an issue. David, did you pay any attention to how busy the > pgbench process was? I certainly haven't ever tried that. David, the thing you want to do here is run "top -c" when pgbench is going. You should see the pgbench process and a bunch of postmaster ones, with "-c" (or by hitting "c" while top is running) you can even see what they're all doing. If the pgbench process is consuming close to 100% of a CPU's time, that means the results it's giving are not valid--what you're seeing in that case are the limitations of the testing program instead. You can even automate collection of that with something like this: top -b -d 10 -c -n 10000 > top.log & TOPPID=$! (run test) kill $TOPPID That will save a snapshot every 10 seconds of what's happening during your test. -- * Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD