Re: Hint Bits and Write I/O

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Hint Bits and Write I/O
Date: 2008-05-27 22:22:16
Message-ID: 1211926936.2705.12.camel@dogma.ljc.laika.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, 2008-05-27 at 20:35 +0100, Simon Riggs wrote:
> My proposal is to have this as a two-stage process. When we set the hint
> on a tuple in a clean buffer we mark it BM_DIRTY_HINTONLY, if not
> already dirty. If we set a hint on a buffer that is BM_DIRTY_HINTONLY
> then we mark it BM_DIRTY.

I would suggest calling that something like BM_DIRTY_ONEHINT or
something, to more accurately reflect what's happening.

Even when we do mark it several times, why do we need to actually mark
it BM_DIRTY? We can then mark it BM_DIRTY_HINTSONLY, and then use some
heuristics to determine whether we actually want to write it. For
instance, we don't need to write out such a page during checkpoint,
right? That might help smooth things out. Or during heavy I/O activity
in general, for that matter.

If it's only a hint, then that means we have the option. We might as
well express the fact that it is optional to something better able to
make the decision, like the process evicting the buffer or the bgwriter.

Regards,
Jeff Davis

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-05-27 23:32:45 Re: Hint Bits and Write I/O
Previous Message Simon Riggs 2008-05-27 22:10:42 Re: Hint Bits and Write I/O

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-05-27 23:32:45 Re: Hint Bits and Write I/O
Previous Message Simon Riggs 2008-05-27 22:10:42 Re: Hint Bits and Write I/O