Re: The Free Space Map: Problems and Opportunities

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jan Wieck <jan(at)wi3ck(dot)info>, Gregory Smith <gregsmithpgsql(at)gmail(dot)com>, John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: The Free Space Map: Problems and Opportunities
Date: 2021-08-20 15:34:23
Message-ID: CA+Tgmob1A5jhOWzTUs3k3jRm50Du-U+wAdEFenJ287esT+G-Uw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Aug 20, 2021 at 11:06 AM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Fri, Aug 20, 2021 at 7:32 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > I don't know whether 60 is optimal or not, but it doesn't seem crazy.
>
> Uh, I had it right the first time. Only the fill factor setting is
> "inverted relative to Postgres". This other setting really does
> default to 40. So it's very low.

I expect they ran more than zero tests before selecting that value, so
it's probably a decent choice in their system. However, that does seem
rather low. I would have guessed that a good value would be in the
50-80 percent range. It's hard to know, though, partly because
everything is workload dependent, and partly because you're balancing
two good things that are qualitatively different. A lower value
figures to reduce the degree of "mixing" of older and newer data
within the same pages, but it also risks permanently wasting space
that could have been put to efficient use. Imagine a table that is
written some number of times and then, all at once, you stop all
writes forever. You probably don't want to discover at that point in
time that you have a large number of pages that are not even close to
full, but you can't know when, if ever, such an event will happen for
any given table.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2021-08-20 15:48:40 Re: The Free Space Map: Problems and Opportunities
Previous Message Jelte Fennema 2021-08-20 15:29:52 Re: [EXTERNAL] Re: Allow declaration after statement and reformat code to use it