Re: posix_fadvise missing in the walsender

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Joachim Wieland <joe(at)mcknight(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: posix_fadvise missing in the walsender
Date: 2013-02-20 15:54:53
Message-ID: CA+TgmobH7v=L0o5C7GFmHsdTha_ktBVdwtmZ21MX5LVKAb+abA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 19, 2013 at 5:48 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> I agree with Merlin and Joachim - if we have the call in one place, we
> should have it in both.

We might want to assess whether we even want to have it one place.
I've seen cases where the existing call hurts performance, because of
WAL file recycling. If we don't flush the WAL file blocks out of
cache, then they're still there when we recycle the WAL file and we
can overwrite them without further I/O. But if we tell the OS to blow
them away, then it has to reread them when we try to overwrite the old
files, and so we stall waiting for the I/O. I was able to clearly
measure this problem back when I was hacking on write scalability, so
it's not a purely hypothetical risk.

As for the proposed optimization, I tend to doubt that it's a good
idea. We're talking about doing extra work to give the OS cache a
hint that may not be right anyway. Color me skeptical... but like
Heikki, I'm certainly willing to be proven wrong by some actual
benchmark results.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2013-02-20 15:55:22 Re: streaming header too small
Previous Message Selena Deckelmann 2013-02-20 15:53:54 Re: streaming header too small