Re: Experimental dynamic memory allocation of postgresql shared memory
От
Aleksey Demakov
Тема
Re: Experimental dynamic memory allocation of postgresql
shared memory
Дата
Msg-id
CAFCwUrCT4M1Zm+9f66BZbos56G-nWWpjFnCq0hyeJeOF4tnWUA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Experimental dynamic memory allocation of postgresql shared memory Aleksey Demakov <ademakov@gmail.com>
Re: Experimental dynamic memory allocation of postgresql shared memory Tom Lane <tgl@sss.pgh.pa.us>
Re: Experimental dynamic memory allocation of postgresql
shared memory Robert Haas <robertmhaas@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Aleksey Demakov <ademakov@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Robert Haas <robertmhaas@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Aleksey Demakov <ademakov@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Andres Freund <andres@anarazel.de>
Re: Experimental dynamic memory allocation of postgresql
shared memory Aleksey Demakov <ademakov@gmail.com>
Re: Experimental dynamic memory allocation of postgresql shared memory Tom Lane <tgl@sss.pgh.pa.us>
Re: Experimental dynamic memory allocation of postgresql
shared memory Aleksey Demakov <ademakov@gmail.com>
Re: Experimental dynamic memory allocation of postgresql shared memory Tom Lane <tgl@sss.pgh.pa.us>
Re: Experimental dynamic memory allocation of postgresql
shared memory Aleksey Demakov <ademakov@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Robert Haas <robertmhaas@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Craig Ringer <craig@2ndquadrant.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Michael Paquier <michael.paquier@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Aleksey Demakov <ademakov@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory "David G. Johnston" <david.g.johnston@gmail.com>
Re: Experimental dynamic memory allocation of postgresql
shared memory Aleksey Demakov <ademakov@gmail.com>
On Fri, Jun 17, 2016 at 9:30 PM, Tom Lane wrote: > Aleksey Demakov writes: >> I have some very experimental code to enable dynamic memory allocation >> of shared memory for postgresql backend processes. > > Um ... what's this do that the existing DSM stuff doesn't do? > It operates over a single large shared memory segment. Within this segment it lets alloc / free small chunks of memory from 16 bytes to 16 kilobytes. Chunks are carved out from fixed-size 32k blocks. Each block is used to allocate chunks of single size class. When a block is full, another block for a given size class is taken from the top shared segment. The goal is to support high levels of concurrency for alloc / free calls. Therefore the allocator is mostly non-blocking. Currently it uses Heller's lazy list algorithm to maintain block lists of a given size class, so it uses slocks once in a while, when a new block is added or removed. If this proves to cause scalability problems the Heller's list might be replaced with Maged Michael's lock-free list to make the whole allocator absolutely lock-free. Additionally it provides epoch-based memory reclamation facility that solves ABA-problem for lock-free algorithms. I am going to implement some lock-free algorithms (extendable hash-tables and probably skip lists) on top of this facility. Regards, Aleksey
В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Robert Haas
Дата: