Re: [HACKERS] PATCH: two slab-like memory allocators

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] PATCH: two slab-like memory allocators
Дата
Msg-id 20170227165138.h4tlklpjhiexotgo@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] PATCH: two slab-like memory allocators  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2017-02-27 15:11:40 +0100, Tomas Vondra wrote:
> > I've not yet reviewed the generational allocator yet, but during these
> > measurements I get:
> > postgres[3970][1]=# select count(*) FROM pg_logical_slot_get_changes('ttt', NULL, NULL);
> > WARNING:  01000: problem in Generation Tuples: number of free chunks 0 in block 0x55d011ef10f0 exceeds 7234
allocated
> > LOCATION:  GenerationCheck, generation.c:693
> > WARNING:  01000: problem in Generation Tuples: number of free chunks 0 in block 0x55d01023eba0 exceeds 65532
allocated
> > LOCATION:  GenerationCheck, generation.c:693
> > WARNING:  01000: problem in Generation Tuples: number of free chunks 0 in block 0x55d00d7fb870 exceeds 65532
allocated
> > LOCATION:  GenerationCheck, generation.c:693
> > WARNING:  01000: problem in Generation Tuples: number of free chunks 0 in block 0x55d00cde17b0 exceeds 65531
allocated
> > LOCATION:  GenerationCheck, generation.c:693
> > 
> > that seems to occur when there's currently in-progress transactions when
> > finishing decoding:
> > 
> ...
> > 
> > could it be that the test's condition is inverted?
> > 
> 
> Yeah, that seems like the culprit - the condition seems wrong. I wonder why
> I haven't seen it during my tests, though ...

I suspect it's because your tests only triggered a memory context reset
when it was empty... But I ran decoding while a concurrent write
transaction was ongoing...


> > I'll work on getting slab committed first, and then review / edit /
> > commit generation.c later.  One first note there is that I'm wondering
> > if generation.c is a too generic filename.

> Naming things is hard.

Indeed.  I was thinking of genalloc, but that might be understood as
general, rather generational...

Greetings,

Andres Freund



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] PATCH: two slab-like memory allocators
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: [HACKERS] PATCH: two slab-like memory allocators