Load distributed checkpoint V4

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Load distributed checkpoint V4
Date: 2007-04-19 04:09:48
Message-ID: 20070419125346.6C41.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Here is an updated version of LDC patch (V4).

- Refactor the codes to minimize the impact of changes.
- Progress of checkpoint is controlled not only based on checkpoint_timeout
but also checkpoint_segments. -- Now it works better with large
checkpoint_timeout and small checkpoint_segments.

We can control the delay of checkpoints using three parameters:
checkpoint_write_percent, checkpoint_nap_percent and checkpoint_sync_percent.
If we set all of the values to zero, checkpoint behaves as it was.

Heikki Linnakangas <heikki(at)enterprisedb(dot)com> wrote:

> I'd suggest rearranging the code so that BgBufferSync and mdsync would
> basically stay like they are without the patch; the signature wouldn't
> change. To do the naps during a checkpoint, inject calls to new
> functions like CheckpointWriteNap() and CheckpointFsyncNap() inside
> BgBufferSync and mdsync. Those nap functions would check if enough
> progress has been made since last call and sleep if so.

Yeah, it makes LDC less intrusive. Now the code flow in checkpoints stay
as it was and the nap-functions are called periodically in BufferSync()
and smgrsync(). But the signatures of some functions needed small changes;
the argument 'immediate' was added.

> The nap-functions would call
> BgWriteLRUBuffers if more than bgwriter_delay milliseconds have passed
> since last call to it.

Only LRU buffers are written in nap and sync phases in the new patch.
The ALL activity of bgwriter was primarily designed to write drity buffers
on ahead of checkpoints, so the writes were not needed *in* checkpoints.

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

Attachment Content-Type Size
LDC_v4.patch application/octet-stream 31.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2007-04-19 04:10:45 Re: Background LRU Writer/free list
Previous Message Greg Smith 2007-04-19 03:04:04 Re: Background LRU Writer/free list

Browse pgsql-patches by date

  From Date Subject
Next Message Zoltan Boszormenyi 2007-04-19 09:19:40 parser dilemma
Previous Message Alvaro Herrera 2007-04-18 22:28:21 Re: [PATCHES] log_autovacuum