Re: To keep indexes in memory, is large enough effective_cache_size enough?

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Kaixi Luo <kaixiluo(at)gmail(dot)com>
Cc: "Sam R(dot)" <samruohola(at)yahoo(dot)com>, Sergei Kornilov <sk(at)zsrv(dot)org>, pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: To keep indexes in memory, is large enough effective_cache_size enough?
Date: 2018-09-19 10:23:18
Message-ID: CAKJS1f8UfHsZ0VYQ1nGo+YzNmWqGZ7t6Bf9FWW7g-PqgLX9B6Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 19 September 2018 at 22:12, Kaixi Luo <kaixiluo(at)gmail(dot)com> wrote:
> Does a large shared_buffers impact checkpoint performance negatively? I was
> under the impression that everything inside shared_buffers must be written
> during a checkpoint.

Only the dirty buffers get written.

Also having too small a shared buffers can mean that buffers must be
written more than they'd otherwise need to be. If a buffer must be
evicted from shared buffers to make way for a new buffer then the
chances of having to evict a dirty buffer increases with smaller
shared buffers. Obviously, this dirty buffer needs to be written out
before the new buffer can be loaded in. In a worst-case scenario, a
backend performing a query would have to do this. pg_stat_bgwriter is
your friend.

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Sam R. 2018-09-19 11:01:16 Re: To keep indexes in memory, is large enough effective_cache_size enough?
Previous Message Kaixi Luo 2018-09-19 10:12:35 Re: To keep indexes in memory, is large enough effective_cache_size enough?