Re: Reducing relcache memory usage: deduping index shapes - Mailing list pgsql-hackers

From David Geier
Subject Re: Reducing relcache memory usage: deduping index shapes
Date
Msg-id dfb1cada-e9c2-488c-80de-3f343ac74cbc@googlemail.com
Whole thread
Responses Re: ri_Fast* crash w/ nullable UNIQUE constraint
List pgsql-hackers
Hi!

>> Can you provide information about how much memory is being saved from 0004+0005?
> Attached the output for a query on catcache/relcache memory context
> data, with output of master and the full patchset.
>
>  From Master to 0003, we go from 287872 bytes total to 141312 bytes
> total spent on "index info" contexts (some of which moved into other
> contexts, some new, but a net saving of 130kB). 0004+0005 bring that
> down all the way to 45392 bytes; most of which is just avoiding the
> large overhead of the pre-allocated Blocks of memory, saving another
> 95kB.

I tested your patch with my real world database schema consisting of
38,966 tables and 148,468 indexes. The results are attached. They look
great:

Total used_bytes of all relcache memory contexts shrank from
776 MiB -> 633 MiB. Saving of 143 MiB!

--
David Geier

Attachment

pgsql-hackers by date:

Previous
From: Osama Abdul Qader
Date:
Subject: Re: Fix unnecessary shared memory page allocation in CalculateShmemSize()
Next
From: Antonin Houska
Date:
Subject: Re: REPACK (CONCURRENTLY) backend waits indefinitely when decoding worker fails to start