Re: Excessive WAL generation and related performance issue - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Excessive WAL generation and related performance issue
Date
Msg-id 20140414215059.GA4161@awork2.anarazel.de
Whole thread Raw
In response to Excessive WAL generation and related performance issue  (Joe Conway <mail@joeconway.com>)
Responses Re: Excessive WAL generation and related performance issue
Re: Excessive WAL generation and related performance issue
List pgsql-hackers
Hi,

On 2014-04-14 14:33:03 -0700, Joe Conway wrote:
> checkpoint_segments = 96
> checkpoint_timeout = 10min

> I realize there are many things that can be done to improve my
> specific scenario, e.g. drop indexes before loading, change various
> configs, etc. My purpose for this post is to ask if it is really
> expected to get over 20 times as much WAL as heap data?

I'd bet a large percentage of this will be full page images of the
index. The values you index are essentially distributed over the whole
index, so you'll modifiy the same indx values repeatedly. But often
enough it won't be in the same checkpoint and thus will create full page
images.
I bet you'll see noticeably - while still not great - better performance
by setting checkpoint_timeout to an hour (with a corresponding increase
in checkpoint_segments).
Have you checked how often checkpoints are actually created? I'd bet
it's far more frequent than every 10min with that _segments setting and
such a load.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Excessive WAL generation and related performance issue
Next
From: Jim Nasby
Date:
Subject: Re: Excessive WAL generation and related performance issue