Re: Increasing catcache size

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Increasing catcache size
Date: 2006-06-15 00:04:31
Message-ID: 6943.1150329871@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> I just thought of a more radical idea: do we need a limit on catcache
>> size at all? On "normal size" databases I believe that we never hit
>> 5000 entries at all (at least, last time I ran the CATCACHE_STATS code
>> on the regression tests, we didn't get close to that). We don't have
>> any comparable limit in the relcache and it doesn't seem to hurt us,
>> even though a relcache entry is a pretty heavyweight object.

> Well, assuming you never access all those tables, you don't use lots of
> memory, but if you are accessing a lot, it seems memory for all your
> tables is a minimal overhead.

I re-did the test of running the regression tests with CATCACHE_STATS
enabled. The largest catcache population in any test was 1238 tuples,
and most backends had 500 or less. I'm not sure whether you'd really
want to consider the regression database as representative of small
production databases, but granted that assumption, the current limit of
5000 tuples isn't limiting anything on small-to-middling databases.
(Note we are counting tables and other cataloged objects, *not* volume
of data stored --- so the regression database could easily be much
bigger than many production DBs by this measure.)

So I'm pretty strongly inclined to just dike out the limit. If you're
running a database big enough to hit the existing limit, you can well
afford to put more memory into the catcache.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-06-15 00:07:22 Re: Re-thing PG_MODULE_MAGIC
Previous Message Josh Berkus 2006-06-14 23:54:00 Re-thing PG_MODULE_MAGIC