Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Claudio Freire <klaussfreire(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Date: 2014-05-07 13:50:41
Message-ID: CA+U5nMLR+L0-tvZ=SM=brrVW84GfZeCUjF4AxhZA-B9_cNacug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7 May 2014 13:31, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, May 7, 2014 at 3:18 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> If we believe that 25% of shared_buffers worth of heap blocks would
>> flush the cache doing a SeqScan, why should we allow 400% of
>> shared_buffers worth of index blocks?
>
> I think you're comparing apples and oranges.

I understood the distinction, which is why I changed the direction of
my thinking to say

> Yes, we can make plans assuming we can use OS cache,
> but we shouldn't be churning shared_buffers when we execute those
> plans.

and hence why I proposed

> I think I'm arguing myself towards using a BufferAccessStrategy of
> BAS_BULKREAD for large IndexScans, BitMapIndexScans and
> BitMapHeapScans.

which I hope will be effective in avoiding churn in shared_buffers
even though we may use much larger memory from the OS.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-05-07 14:07:07 Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Previous Message Andres Freund 2014-05-07 13:50:12 Re: Wanted: jsonb on-disk representation documentation