Re: Spread checkpoint sync - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Spread checkpoint sync
Date
Msg-id 18251.1296492673@sss.pgh.pa.us
Whole thread Raw
In response to Re: Spread checkpoint sync  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Spread checkpoint sync
Re: Spread checkpoint sync
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Jan 31, 2011 at 11:29 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> That sounds like you have an entirely wrong mental model of where the
>> cost comes from. �Those times are not independent.

> Yeah, Greg Smith made the same point a week or three ago.  But it
> seems to me that there is potential value in overlaying the write and
> sync phases to some degree.  For example, if the write phase is spread
> over 15 minutes and you have 30 files, then by, say, minute 7, it's a
> probably OK to flush the file you wrote first.

Yeah, probably, but we can't do anything as stupid as file-by-file.

I wonder whether it'd be useful to keep track of the total amount of
data written-and-not-yet-synced, and to issue fsyncs often enough to
keep that below some parameter; the idea being that the parameter would
limit how much dirty kernel disk cache there is.  Of course, ideally the
kernel would have a similar tunable and this would be a waste of effort
on our part...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Spread checkpoint sync
Next
From: Robert Haas
Date:
Subject: Re: Spread checkpoint sync