Re: Protect syscache from bloating with negative cache entries - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Protect syscache from bloating with negative cache entries
Date
Msg-id 20180301192918.cqh3hoo4746lqf4i@alap3.anarazel.de
Whole thread Raw
In response to Re: Protect syscache from bloating with negative cache entries  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Protect syscache from bloating with negative cache entries  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

On 2018-03-01 14:24:56 -0500, Robert Haas wrote:
> On Thu, Mar 1, 2018 at 1:54 PM, Andres Freund <andres@anarazel.de> wrote:
> > So this is hardcoded, without any sort of cache pressure logic? Doesn't
> > that mean we'll often *severely* degrade performance if a backend is
> > idle for a while?
> 
> Well, it is true that if we flush cache entries that haven't been used
> in a long time, a backend that is idle for a long time might be a bit
> slow when (and if) it eventually becomes non-idle, because it may have
> to reload some of those flushed entries.

Right. Which might be very painful latency wise. And with poolers it's
pretty easy to get into situations like that, without the app
influencing it.


> On the other hand, a backend that holds onto a large number of cache
> entries that it's not using for tens of minutes at a time degrades the
> performance of the whole system unless, of course, you're running on a
> machine that is under no memory pressure at all.

But it's *extremely* common to have no memory pressure these days. The
inverse definitely also exists.


> I don't understand why people keep acting as if holding onto cache
> entries regardless of how infrequently they're being used is an
> unalloyed good.

Huh? I'm definitely not arguing for that? I think we want a feature like
this, I just don't think the logic when to prune is quite sophisticated
enough?

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Protect syscache from bloating with negative cache entries
Next
From: Robert Haas
Date:
Subject: Re: [GSOC 18] Performance Farm Project