From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Greg Smith <greg(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: checkpoint writeback via sync_file_range |
Date: | 2012-01-11 12:41:35 |
Message-ID: | CA+U5nMJz4dc3TxNPHjnSidzXm1CoLM3YnxwbgqUseYWT2h+nxw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jan 11, 2012 at 9:28 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> It does open the door to various other uses, so I think this work will
> be useful.
Yes, I think this would allow a better design for the checkpointer.
Checkpoint scan will collect buffers to write for checkpoint and sort
them by fileid, like Koichi/Itagaki already suggested.
We then do all the writes for a particular file, then issue a
background sync_file_range, then sleep a little. Loop. At end of loop,
collect up and close the sync_file_range calls with a
SYNC_FILE_RANGE_WAIT_AFTER.
So we're interleaving the writes and fsyncs throughout the whole
checkpoint, not bursting the fsyncs at the end.
With that design we would just have a continuous checkpoint, rather
than having 0,5 or 0.9
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2012-01-11 12:46:29 | Re: checkpoint writeback via sync_file_range |
Previous Message | Simon Riggs | 2012-01-11 12:33:55 | Re: [WIP] Double-write with Fast Checksums |