From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Greg Smith <greg(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: checkpoint writeback via sync_file_range |
Date: | 2012-01-11 14:25:13 |
Message-ID: | 201201111525.13818.andres@anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wednesday, January 11, 2012 03:20:09 PM Greg Smith wrote:
> 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.
We do care imo. The heavy pressure putting it directly in the writeback queue
leads to less efficient io because quite often it won't reorder sensibly with
other io anymore and thelike. At least that was my experience in using it with
in another application.
Lots of that changed with linux 3.2 (near complete rewrite of the writeback
mechanism), so a bit of that might be moot anyway.
I definitely aggree that 9.2 opens new possibilities there.
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2012-01-11 14:41:45 | Re: JSON for PG 9.2 |
Previous Message | Greg Smith | 2012-01-11 14:20:09 | Re: checkpoint writeback via sync_file_range |