Re: New to PostgreSQL, performance considerations

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alexander Staubo <alex(at)purefiction(dot)net>, Michael Stone <mstone+postgres(at)mathom(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: New to PostgreSQL, performance considerations
Date: 2006-12-12 16:11:06
Message-ID: 20061212161106.GF22782@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane wrote:
> Alexander Staubo <alex(at)purefiction(dot)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.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2006-12-12 16:33:20 Re: Low throughput of binary inserts from windows to linux
Previous Message Greg Smith 2006-12-12 16:08:14 Re: New to PostgreSQL, performance considerations