Re: auto-sizing wal_buffers

Marti Raudsepp <marti@juffo.org>

From: Marti Raudsepp <marti@juffo.org>
To: Josh Berkus <josh@agliodbs.com>
Cc: Greg Smith <greg@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Magnus Hagander <magnus@hagander.net>, pgsql-hackers@postgresql.org
Date: 2011-01-16T22:46:06Z
Lists: pgsql-hackers
On Sun, Jan 16, 2011 at 00:34, Josh Berkus <josh@agliodbs.com> wrote:
> I think we can be more specific on that last sentence; is there even any
> *theoretical* benefit to settings above 16MB, the size of a WAL segment?
>  Certainly there have been no test results to show any.

I don't know if it's applicable to real workloads in any way, but it
did make a measurable difference in one of my tests.

Back when benchmarking different wal_sync_methods, I found that when
doing massive INSERTs from generate_series, the INSERT time kept
improving even after increasing wal_buffers from 16MB to 32, 64 and
128MB; especially with wal_sync_method=open_datasync. The total
INSERT+COMMIT time remained constant, however.

More details here:
http://archives.postgresql.org/pgsql-performance/2010-11/msg00094.php

Regards,
Marti