Re: WAL tuning advice - Mailing list pgsql-novice

From Tom Lane
Subject Re: WAL tuning advice
Date
Msg-id 8537.1343690142@sss.pgh.pa.us
Whole thread Raw
In response to WAL tuning advice  (Joseph Marlin <jmarlin@saucontech.com>)
List pgsql-novice
Joseph Marlin <jmarlin@saucontech.com> writes:
> I'm hoping someone can help me figure out how to better tune my WAL parameters. Right now I am seeing WAL activity
thatis faster than I think it should be - we average about 30 write queries a second at our peak, and yet we're getting
anew WAL file every 15-20 seconds.  

You would be better off asking about this on pgsql-performance, but yes,
the first thing you should try is boosting checkpoint_segments and
checkpoint_timeout.  The longer the interval between checkpoints, the lower
the WAL volume will be, because of reduction of full-page-image updates.
The limiting factor of course is how long a replay you can stand after
a database crash.

> 1) Due to high ratio of checkpoints_req to checkpoints_timed, I should increase checkpoints_segments, maybe from 10
to15?  

Right now, at one segment every 15 seconds, "10" is forcing a checkpoint
every 150 seconds.  You probably want at least four or five times that
interval if you want to make a serious dent in the WAL volume.  And
checkpoint_timeout has to increase enough to allow that, of course.

            regards, tom lane

pgsql-novice by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Index slow down insertions...
Next
From: Tom Lane
Date:
Subject: Re: very slow update query