Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS
Date
Msg-id 705850.1620669976@sss.pgh.pa.us
Whole thread Raw
In response to Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS  (Andres Freund <andres@anarazel.de>)
Responses Re: Reducing opr_sanity test's runtime under CLOBBER_CACHE_ALWAYS
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2021-05-08 15:44:57 -0400, Tom Lane wrote:
>> I was able to complete a bisection using just that test, and
>> got an unexpected result: most of the slowdown appeared at
>> ab596105b (BRIN minmax-multi indexes).  Apparently the additional
>> time is simply from having to check the additional pg_amop and
>> pg_amproc entries, which that patch added quite a few of.

> I suspect that it might be not just that. From a quick profile it looks
> like debug_invalidate_system_caches_always spends a good chunk of its
> time in ResetCatalogCache() and hash_seq_search(). Those cost linearly
> with the size of the underlying hash tables.
> Wo what what might be happening is that the additional catalog entries
> pushed some of the catcache hash tables into growing
> (RehashCatCache()). Which then makes all subsequent ResetCatalogCache()
> scans slower.

Hm.  But constantly flushing the caches should mean that they're never
populated with very many entries at one time, which ought to forestall
that, at least to some extent.

I wonder if there's anything we could do to make ResetCatalogCache
faster?  It wouldn't help much for normal execution of course,
but it might do something to bring CCA testing time down out of
the stratosphere.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: PG 14 release notes, first draft
Next
From: Alvaro Herrera
Date:
Subject: Re: AlterSubscription_refresh "wrconn" wrong variable?