From: Alvaro Herrera <alvherre@commandprompt.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alexander Staubo <alex@purefiction.net>
Cc: Michael Stone <mstone+postgres@mathom.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: New to PostgreSQL, performance considerations
Date: Tue, 12 Dec 2006 13:11:06 -0300
Message-ID: <20061212161106.GF22782@alvh.no-ip.org> (raw)
In-Reply-To: <3356.1165938462@sss.pgh.pa.us>
References: <20061211173105.GH16692@mathom.us>
<E1Gtplp-0004Ka-GM@elasmtp-junco.atl.sa.earthlink.net>
<20061211184726.GI16692@mathom.us>
<E1GtrB8-0005rw-Iu@elasmtp-kukur.atl.sa.earthlink.net>
<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>
Tom Lane wrote:
> Alexander Staubo <alex@purefiction.net> 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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: alvherre@commandprompt.com, tgl@sss.pgh.pa.us, alex@purefiction.net, mstone+postgres@mathom.us
Subject: Re: New to PostgreSQL, performance considerations
In-Reply-To: <20061212161106.GF22782@alvh.no-ip.org>
References: <20061211173105.GH16692@mathom.us> <E1Gtplp-0004Ka-GM@elasmtp-junco.atl.sa.earthlink.net> <20061211184726.GI16692@mathom.us> <E1GtrB8-0005rw-Iu@elasmtp-kukur.atl.sa.earthlink.net> <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> <20061212161106.GF22782@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox