Re: Protect syscache from bloating with negative cache entries

From: Andres Freund <andres(at)anarazel(dot)de>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com, bruce(at)momjian(dot)us, GavinFlower(at)archidevsys(dot)co(dot)nz, robertmhaas(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)lists(dot)postgresql(dot)org, alvherre(at)alvh(dot)no-ip(dot)org, michael(dot)paquier(at)gmail(dot)com, david(at)pgmasters(dot)net, Jim(dot)Nasby(at)bluetreble(dot)com, ideriha(dot)takeshi(at)jp(dot)fujitsu(dot)com, craig(at)2ndquadrant(dot)com
Subject: Re: Protect syscache from bloating with negative cache entries
Date: 2019-02-06 08:47:05
Message-ID: 20190206084705.wh5mltzyt77fkkse@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-02-06 17:37:04 +0900, Kyotaro HORIGUCHI wrote:
> At Wed, 06 Feb 2019 15:16:53 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote in <20190206(dot)151653(dot)117382256(dot)horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
> > > The two should have the same extent of impact on performance when
> > > disabled. I'll take numbers briefly using pgbench.
>
> (pgbench -j 10 -c 10 -T 120) x 5 times for each.
>
> A: unpached : 118.58 tps (stddev 0.44)
> B: pached-not-used[1] : 118.41 tps (stddev 0.29)
> C: patched-timedprune[2]: 118.41 tps (stddev 0.51)
> D: patched-capped...... : none[3]
>
> [1]: cache_prune_min_age = 0, cache_entry_limit = 0
>
> [2]: cache_prune_min_age = 100, cache_entry_limit = 0
> (Prunes every 100ms)
>
> [3] I didin't find a sane benchmark for the capping case using
> vanilla pgbench.
>
> It doesn't seem to me showing significant degradation on *my*
> box...
>
> # I found a bug that can remove newly created entry. So v11.

This seems to just benchmark your disk speed, no? ISTM you need to
measure readonly performance, not read/write. And with plenty more
tables than just standard pgbench -S.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jamison, Kirk 2019-02-06 08:50:45 RE: Cache relation sizes?
Previous Message Michael Paquier 2019-02-06 08:39:43 Re: Tighten up a few overly lax regexes in pg_dump's tap tests