Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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: LDC_v4.patch
Description: application/octet-stream (31.5 KB)

In response to

Responses

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group