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

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

Attached is v9 of this patch series. This addresses most of the points 
raised in the review, namely:

1) change most 'debug' stuff to 'static inline' in memdebug.h

2) fixed and reworded a bunch of comments

3) get rid of the block-level bitmap tracking free chunks

Instead of the bitmap, I've used a simple singly-linked list, using 
int32 chunk indexes. Perhaps it could use the slist instead, but I'm not 
quite sure MAXALIGN is guaranteed to be greater than pointer.

In any case, this seems to be working reasonably well - it saves a bit 
of code (but also made some code slightly more complex). Also, it seems 
to be a tad faster than v8 - after repeating the same benchmark as 
before, I get these numbers:

                 master    slab-v8    slab-v9
     -----------------------------------------
       10000         50         28         25
       50000      17500        180        160
      100000     150000        380        330
      200000          ?        750        670

Although the results are quite noisy.

regards

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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: [HACKERS] Multivariate statistics and expression indexes
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Multivariate statistics and expression indexes