Re: RC2 and open issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: RC2 and open issues
Date
Msg-id 3732.1103610772@sss.pgh.pa.us
Whole thread Raw
In response to Re: RC2 and open issues  (Gavin Sherry <swm@linuxworld.com.au>)
Responses Bgwriter behavior
List pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
> I was also thinking of benchmarking the effect of changing the algorithm
> in StrategyDirtyBufferList(): currently, for each iteration of the loop we
> read a buffer from each of T1 and T2. I was wondering what effect reading
> T1 first then T2 and vice versa would have on performance.

Looking at StrategyGetBuffer, it definitely seems like a good idea to
try to keep the bottom end of both T1 and T2 lists clean.  But we should
work at T1 a bit harder.

The insight I take away from today's discussion is that there are two
separate goals here: try to keep backends that acquire a buffer via
StrategyGetBuffer from being fed a dirty buffer they have to write,
and try to keep the next upcoming checkpoint from having too much work
to do.  Those are both laudable goals but I hadn't really seen before
that they may require different strategies to achieve.  I'm liking the
idea that bgwriter should alternate between doing writes in pursuit of
the one goal and doing writes in pursuit of the other.
        regards, tom lane


pgsql-hackers by date:

Previous
From: lsunley@mb.sympatico.ca
Date:
Subject: Re: rc2 bundled
Next
From: Tom Lane
Date:
Subject: Re: Locale question