Re: FSM search modes - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: FSM search modes
Date
Msg-id 4AC5C1C5020000250002B5BC@gw.wicourts.gov
Whole thread Raw
In response to Re: FSM search modes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> wrote: 
> "Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
>> [pages with free space or total pages in relation?]
> 
> It's going to be the latter --- we do not know, and are *not* going
> to invest the cycles to find out, how many pages have a useful
> amount of free space.  Even finding out the relation physical length
> might be more cycles than we want to spend here ...
OK, after mulling this over for a while, I suspect we'd do pretty well
with starting to consider resetting the sweep after hitting 50% of the
last known relation size (or whatever best approximation is available
at low cost), and using a reset probability of 1 / (max_connections *
4).  That gives about a 77.8% chance of getting to at least
max_connections before resetting the sweep.  Since it leaves about an
8.2% chance of getting to at least ten times max_connections pages
before resetting the sweep, I'm inclined to think we'd want to start
that at 50% of the relation rather than waiting until we get to the
last quarter.  As one more data point to consider, if someone has 2000
connections configured (which I've seen mentioned in many posts), you
would get to 50,000 pages past the point where you start using this
technique one time out of 500.
-Kevin


pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: CommitFest 2009-09, two weeks on
Next
From: Pavel Stehule
Date:
Subject: Re: Issues for named/mixed function notation patch