Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 512C89F946C for ; Tue, 12 Dec 2006 12:11:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 08744-06 for ; Tue, 12 Dec 2006 12:11:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 307229F931E for ; Tue, 12 Dec 2006 12:11:12 -0400 (AST) Received: from perhan.alvh.no-ip.org (200-126-100-202.bk7-dsl.surnet.cl [200.126.100.202]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id kBCGB9fR010553; Tue, 12 Dec 2006 08:11:12 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 3BDBB329FA; Tue, 12 Dec 2006 13:11:06 -0300 (CLST) Date: Tue, 12 Dec 2006 13:11:06 -0300 From: Alvaro Herrera To: Tom Lane Cc: Alexander Staubo , Michael Stone , pgsql-performance@postgresql.org Subject: Re: New to PostgreSQL, performance considerations Message-ID: <20061212161106.GF22782@alvh.no-ip.org> Mail-Followup-To: Tom Lane , Alexander Staubo , Michael Stone , pgsql-performance@postgresql.org References: <20061211173105.GH16692@mathom.us> <20061211184726.GI16692@mathom.us> <457DA782.3060506@modgraph-usa.com> <8a0c7af10612111422x6bdcc0c2p7cbfeb5a7b0e0374@mail.gmail.com> <2FC0D8E7-F8ED-452F-BB13-FB665B516E7F@purefiction.net> <20061212123252.GR16692@mathom.us> <42B14BCF-B745-4F94-B5EA-97997744A4D5@purefiction.net> <3356.1165938462@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3356.1165938462@sss.pgh.pa.us> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 12 Dec 2006 08:11:12 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/299 X-Sequence-Number: 22355 Tom Lane wrote: > Alexander Staubo writes: > > No, fsync=on. The tps values are similarly unstable with fsync=off, > > though -- I'm seeing bursts of high tps values followed by low-tps > > valleys, a kind of staccato flow indicative of a write caching being > > filled up and flushed. > > It's notoriously hard to get repeatable numbers out of pgbench :-( > > A couple of tips: > * don't put any faith in short runs. I usually use -t 1000 > plus -c whatever. > * make sure you loaded the database (pgbench -i) with a scale > factor (-s) at least equal to the maximum -c you want to test. > Otherwise you're mostly measuring update contention. > * pay attention to when checkpoints occur. You probably need > to increase checkpoint_segments if you want pgbench not to be > checkpoint-bound. While skimming over the pgbench source it has looked to me like it's necessary to pass the -s switch (scale factor) to both the initialization (-i) and the subsequent (non -i) runs. I'm not sure if this is obvious from the documentation but I thought it may be useful to mention.