Re: Replaying 48 WAL files takes 80 minutes - Mailing list pgsql-performance

From Jeff
Subject Re: Replaying 48 WAL files takes 80 minutes
Date
Msg-id 9677809C-5FBC-4E8A-9A7E-5F5A3FDAFA0B@jefftrout.com
Whole thread Raw
In response to Re: Replaying 48 WAL files takes 80 minutes  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-performance
On Oct 29, 2012, at 12:42 PM, Jeff Janes wrote:

> On Mon, Oct 29, 2012 at 6:05 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
>> I am configuring streaming replication with hot standby
>> with PostgreSQL 9.1.3 on RHEL 6 (kernel 2.6.32-220.el6.x86_64).
>> PostgreSQL was compiled from source.
>>
>> It works fine, except that starting the standby took for ever:
>> it took the system more than 80 minutes to replay 48 WAL files
>> and connect to the primary.
>>
>> Can anybody think of an explanation why it takes that long?
>
> Could the slow log files be replaying into randomly scattered pages
> which are not yet in RAM?
>
> Do you have sar or vmstat reports?
>
> Cheers,


If you do not have good random io performance log replay is nearly unbearable.

also, what io scheduler are you using? if it is cfq change that to deadline or noop.
that can make a huge difference.


--
Jeff Trout <jeff@jefftrout.com>







pgsql-performance by date:

Previous
From: Dong Ye
Date:
Subject: dbt2 performance regresses from 9.1.6 to 9.2.1
Next
From: Jeff Trout
Date:
Subject: Re: Replaying 48 WAL files takes 80 minutes