Re: effective_cache_size

From: Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: peter(dot)eisentraut(at)2ndquadrant(dot)com, nat(at)makarevitch(dot)org, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: effective_cache_size
Date: 2018-11-05 12:23:03
Message-ID: CANNMO++QsKXLm1E=8uSnSJYgLC5ZJnAYxJZogTLfYdGUXrcV3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Mon, Nov 5, 2018 at 3:01 PM Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> > > {"effective_cache_size", PGC_USERSET, QUERY_TUNING_COST,
> > > - gettext_noop("Sets the planner's assumption about
> the size of the disk cache."),
> > > - gettext_noop("That is, the portion of the kernel's
> disk cache that "
> > > - "will be used for
> PostgreSQL data files. This is measured in disk "
> > > - "pages, which are
> normally 8 kB each."),
> > > + gettext_noop("Sets the planner's assumption about
> the size of the data cache."),
> > > + gettext_noop("That is, the size of the cache used
> for PostgreSQL data files. "
> > > + "This is measured in disk
> pages, which are normally 8 kB each."),
>
...

> Well, the change as outlined in the email is that effective_cache_size
> is a combination of shared_buffers and kernel cache size, which I think
> the docs now make clear. Do you have better wording for the GUC?
>

Maybe it's better to use this phrase, "a combination of shared_buffers and
kernel cache size"?
Or: "a combination of shared_buffers and estimated kernel cache size".

The phrase "the size of the cache" might be very confusing indeed – it
sounds like it's about
some single cache, while it's about the combination of two.

Maybe it's also worth to mention that the fact that some pages might be
cached twice –
in OS cache + in Postgres shared buffers – should be ignored, when choosing
the proper value
for effective_cache_size? I think this would finally eliminate the
possibility of confusion.

I see now, the docs chapter "19.7. Query Planning" has "some data might
exist in both places"
– this is great, since confusion here is not uncommon. It's worth to
propagate this change
everywhere where effective_cache_size is explained.

Nik

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Bruce Momjian 2018-11-05 16:12:31 Re: effective_cache_size
Previous Message Bruce Momjian 2018-11-05 12:01:04 Re: effective_cache_size