Re: checkpoint writeback via sync_file_range - Mailing list pgsql-hackers

From Greg Smith
Subject Re: checkpoint writeback via sync_file_range
Date
Msg-id 4F0D9A99.6010108@2ndQuadrant.com
Whole thread Raw
In response to Re: checkpoint writeback via sync_file_range  (Andres Freund <andres@anarazel.de>)
Responses Re: checkpoint writeback via sync_file_range
List pgsql-hackers
On 1/11/12 7:46 AM, Andres Freund wrote:
> I played around with this before and my problem was that sync_file_range is not
> really a hint. It actually starts writeback *directly* and only returns when
> the io is placed inside the queue (at least thats the way it was back then).
> Which very quickly leads to it blocking all the time...

Right, you're answering one of Robert's questions here:  yes, once 
something is pushed toward writeback, it moves toward an actual write 
extremely fast.  And the writeback queue can fill itself.  But we don't 
really care if this blocks.  There's a checkpointer process, it will be 
doing this work, and it has no other responsibilities anymore (as of 
9.2, which is why some of these approaches suddenly become practical). 
It's going to get blocked waiting for things sometimes, the way it 
already does rarely when it writes, and often when it call fsync.


-- 
Greg Smith   2ndQuadrant US    greg@2ndQuadrant.com   Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com


pgsql-hackers by date:

Previous
From: Greg Smith
Date:
Subject: Re: checkpoint writeback via sync_file_range
Next
From: Andres Freund
Date:
Subject: Re: checkpoint writeback via sync_file_range