Re: Replaying 48 WAL files takes 80 minutes

Поиск
Список
Период
Сортировка
Искать
От
Jeff Trout
Тема
Re: Replaying 48 WAL files takes 80 minutes
Дата
Msg-id
B9F96C1F-D0D7-4151-8D15-04CCA93AC369@torgo.978.org
Ответ на
Список
Дерево обсуждения
Replaying 48 WAL files takes 80 minutes "Albe Laurenz" <laurenz.albe@wien.gv.at>
Re: Replaying 48 WAL files takes 80 minutes "ktm@rice.edu" <ktm@rice.edu>
Re: Replaying 48 WAL files takes 80 minutes Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Replaying 48 WAL files takes 80 minutes "Albe Laurenz" <laurenz.albe@wien.gv.at>
Re: Replaying 48 WAL files takes 80 minutes Jeff Janes <jeff.janes@gmail.com>
Re: Replaying 48 WAL files takes 80 minutes Jeff <jeff@jefftrout.com>
Re: Replaying 48 WAL files takes 80 minutes "Albe Laurenz" <laurenz.albe@wien.gv.at>
Re: Replaying 48 WAL files takes 80 minutes "ktm@rice.edu" <ktm@rice.edu>
Re: Replaying 48 WAL files takes 80 minutes "Albe Laurenz" <laurenz.albe@wien.gv.at>
Re: Replaying 48 WAL files takes 80 minutes "ktm@rice.edu" <ktm@rice.edu>
Re: Replaying 48 WAL files takes 80 minutes Heikki Linnakangas <hlinnakangas@vmware.com>
Re: Replaying 48 WAL files takes 80 minutes "Albe Laurenz" <laurenz.albe@wien.gv.at>
Re: Replaying 48 WAL files takes 80 minutes Jeff Trout <threshar@real.jefftrout.com>

On Oct 29, 2012, at 12:42 PM, Jeff Janes wrote:

> On Mon, Oct 29, 2012 at 6:05 AM, Albe Laurenz  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?
> 


If you do not have good random io performance log replay is nearly unbearable. (I've run into this before many times)

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 
В списке pgsql-performance по дате отправления
От: Jeff
Дата:
От: Daniel Burbridge
Дата:
FAQ