Re: Minimizing Recovery Time (wal replication)

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Bryan Murphy <bmurphy1976(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Minimizing Recovery Time (wal replication)
Date: 2009-04-12 10:52:57
Message-ID: 1239533577.16396.46.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Thu, 2009-04-09 at 14:27 -0500, Bryan Murphy wrote:
> I have two hot-spare databases that use wal archiving and continuous
> recovery mode. I want to minimize recovery time when we have to fail
> over to one of our hot spares. Right now, I'm seeing the following
> behavior which makes a quick recovery seem problematic:
>
> (1) hot spare applies 70 to 75 wal files (~1.1g) in 2 to 3 min period
>
> (2) hot spare pauses for 15 to 20 minutes, during this period pdflush
> consumes 99% IO (iotop). Dirty (from /proc/meminfo) spikes to ~760mb,
> remains at that level for the first 10 minutes, and then slowly ticks
> down to 0 for the second 10 minutes.
>
> (3) goto 1

The database is performing too frequent restartpoints.

This has been optimised in PostgreSQL 8.4 by the addition of the
bgwriter running during recovery. This will mean that your hot spare
will not pause while waiting for restartpoint to complete, so will be
significantly faster.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2009-04-12 10:57:37 Re: Querying a Large Partitioned DB
Previous Message Martin Gainty 2009-04-12 00:00:29 Re: Maximum number of columns in a table