Re: Postgresql.conf cleanup

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Smith <gsmith(at)gregsmith(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Postgresql.conf cleanup
Date: 2007-07-02 20:47:08
Message-ID: 22529.1183409228@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Smith <gsmith(at)gregsmith(dot)com> writes:
> On Mon, 2 Jul 2007, Tom Lane wrote:
>>> # wal_buffers = 1MB
>> Is there really evidence in favor of such a high setting for this,
>> either?

> I noticed consistant improvements in throughput on pgbench results with
> lots of clients going from the default to 256KB, flatlining above that; it
> seemed sufficiently large for any system I've used. I've taken to using
> 1MB anyway nowadays because others suggested that number, and it seemed to
> be well beyond the useful range and thus never likely to throttle
> anything. Is there any downside to it being larger than necessary beyond
> what seems like a trivial amount of additional RAM?

There might be some value in keeping wal_buffers small enough to fit in
L2 cache; not sure.

But pgbench is not really the poster child for large wal_buffers,
because it consists exclusively of short transactions. The gain from
enlarging wal_buffers stops the moment it passes your largest
time-between-commits, since a commit has to flush out whatever's in
there.

There's probably not much point in arguing this now, though; once the
async commit patch is in there we will have to re-measure all the
behavior and develop new recommendations (and, quite possibly, a new
default value). The existence of the walwriter will reduce the useful
size of wal_buffers, but the existence of async commit might increase it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-07-02 20:47:18 Re: GiST consistent function, expected arguments; multi-dimensional indexes
Previous Message Gregory Stark 2007-07-02 20:45:14 Re: [COMMITTERS] pgsql: Fix failure to restart Postgres when Linux kernel returns EIDRM