Re: Spread checkpoint sync

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Spread checkpoint sync
Date: 2011-01-17 16:19:20
Message-ID: 201101171619.p0HGJKh02349@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Smith wrote:
> One of the components to the write queue is some notion that writes that
> have been waiting longest should eventually be flushed out. Linux has
> this number called dirty_expire_centiseconds which suggests it enforces
> just that, set to a default of 30 seconds. This is why some 5-minute
> interval checkpoints with default parameters, effectively spreading the
> checkpoint over 2.5 minutes, can work under the current design.
> Anything you wrote at T+0 to T+2:00 *should* have been written out
> already when you reach T+2:30 and sync. Unfortunately, when the system
> gets busy, there is this "congestion control" logic that basically
> throws out any guarantee of writes starting shortly after the expiration
> time.

Should we be writing until 2:30 then sleep 30 seconds and fsync at 3:00?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-01-17 16:27:16 Re: Moving test_fsync to /contrib?
Previous Message Bruce Momjian 2011-01-17 16:16:21 Re: Moving test_fsync to /contrib?