Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 605F8632AF6 for ; Fri, 3 Apr 2009 18:43:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 25596-02 for ; Fri, 3 Apr 2009 18:43:10 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f167.google.com (mail-ew0-f167.google.com [209.85.219.167]) by mail.postgresql.org (Postfix) with ESMTP id CDDCC632691 for ; Fri, 3 Apr 2009 18:43:15 -0300 (ADT) Received: by ewy11 with SMTP id 11so1710412ewy.19 for ; Fri, 03 Apr 2009 14:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5PD9GOhiGyuwANEb/Edjykl9QGmFkpDgUcAd3jZjPbg=; b=gXjC5nuhFsGdjUTg5bzJuxpccttwAHTtP4YWElQj7aRbc3rO716LzU826Jf+SgdSfy E3B6WfAbcBf9RwD/twSnmybrTjcGuxodx+7VPQK93CgYw2EF5cYcVrPP/8acN6dZZoC5 0DSEiFQGAFtrE2jf2zPpl9aYijgMo/LgIk1us= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=FKj58v0e7IXIbkpovhb8+8Y204nWkSGvdQ/8baQdJEwowyg9jZSrxS+Yshv1mlJFPf j/pDrjFsor+L1DpCI96Qxu+0ETF8k57tPtotH9mbKoQ//WxplM4nII+2z3l0oTbFJxLR p1KMz43bX9QhKHch+Go70kzNYbXBNfqJcNYwE= MIME-Version: 1.0 Received: by 10.210.17.14 with SMTP id 14mr1245533ebq.40.1238794994013; Fri, 03 Apr 2009 14:43:14 -0700 (PDT) In-Reply-To: <20090403195302.GA54342@mr-paradox.net> References: <20090403195302.GA54342@mr-paradox.net> Date: Fri, 3 Apr 2009 15:43:13 -0600 Message-ID: Subject: Re: Question on pgbench output From: Scott Marlowe To: David Kerr Cc: pgsql-performance@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL=0.003 X-Spam-Level: X-Archive-Number: 200904/84 X-Sequence-Number: 33451 On Fri, Apr 3, 2009 at 1:53 PM, David Kerr wrote: > Here is my transaction file: > \setrandom iid 1 50000 > BEGIN; > SELECT content FROM test WHERE item_id = :iid; > END; > > and then i executed: > pgbench -c 400 -t 50 -f trans.sql -l > > The results actually have surprised me, the database isn't really tuned > and i'm not working on great hardware. But still I'm getting: > > caling factor: 1 > number of clients: 400 > number of transactions per client: 50 > number of transactions actually processed: 20000/20000 > tps = 51.086001 (including connections establishing) > tps = 51.395364 (excluding connections establishing) Not bad. With an average record size of 1.2Meg you're reading ~60 Meg per second (plus overhead) off of your drive(s). > So the question is - Can anyone see a flaw in my test so far? > (considering that i'm just focused on the performance of pulling > the 1.2M record from the table) and if so any suggestions to further > nail it down? You can either get more memory (enough to hold your whole dataset in ram), get faster drives and aggregate them with RAID-10, or look into something like memcached servers, which can cache db queries for your app layer.