Re: Protect syscache from bloating with negative cache entries

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Protect syscache from bloating with negative cache entries
Дата
Msg-id 95bd95f4-761c-78fd-e8eb-ca56b5f94c1f@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: Protect syscache from bloating with negative cache entries  ('Bruce Momjian' <bruce@momjian.us>)
Список pgsql-hackers

On 2/14/19 4:49 PM, 'Bruce Momjian' wrote:
> On Thu, Feb 14, 2019 at 01:31:49AM +0000, Tsunakawa, Takayuki wrote:
>> From: Bruce Momjian [mailto:bruce@momjian.us]
>>>> That being said, having a "minimal size" threshold before starting
>>>> with the time-based eviction may be a good idea.
>>>
>>> Agreed.  I see the minimal size as a way to keep the systems tables
>>> in cache, which we know we will need for the next query.
>>
>> Isn't it the maximum size, not minimal size?  Maximum size allows
>> to keep desired amount of system tables in memory as well as to
>> control memory consumption to avoid out-of-memory errors (OS crash!).
>> I'm wondering why people want to take a different approach to
>> catcatch, which is unlike other PostgreSQL memory e.g. shared_buffers,
>> temp_buffers, SLRU buffers, work_mem, and other DBMSs.
> 
> Well, that is an _excellent_ question, and one I had to think about.
> 

I think we're talking about two different concepts here:

1) minimal size - We don't do any extra eviction at all, until we reach
this cache size. So we don't get any extra overhead from it. If a system
does not have issues.

2) maximal size - We ensure the cache size is below this threshold. If
there's more data, we evict enough entries to get below it.

My proposal is essentially to do just (1), so the cache can grow very
large if needed but then it shrinks again after a while.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Using POPCNT and other advanced bit manipulation instructions
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: explain plans with information about (modified) gucs