Re: dynamically allocating chunks from shared memory

Поиск
Список
Период
Сортировка
От Markus Wanner
Тема Re: dynamically allocating chunks from shared memory
Дата
Msg-id 4C4DCAF8.5000200@bluegap.ch
обсуждение исходный текст
Ответ на Re: dynamically allocating chunks from shared memory  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: dynamically allocating chunks from shared memory  (Robert Haas <robertmhaas@gmail.com>)
Re: dynamically allocating chunks from shared memory  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Hi,

On 07/26/2010 07:16 PM, Robert Haas wrote:
> Of course, there are other parts of the system (a whole bunch of them)
> that used shared memory also, and perhaps some of those could be
> modified to use the dynamic allocator as well.  But they're getting by
> without it now, so maybe they don't really need it.  The SLRU stuff, I
> think, works more or less like shared buffers (so you have the same
> set of issues) and I think most of the other users are allocating
> small, fixed-size chunks.

Yeah, I see your point(s).

Note however, that a thread based design doesn't have this problem *at 
all*. Memory generally is shared (between threads) and you can 
dynamically allocate more or less (until Linux' OOM killer hits you.. 
yet another story). The OS reuses memory you don't currently need even 
for other applications.

Users as well as developers know the threaded model (arguably, much 
better than the process based one). So that's what we get compared to. 
And what developers (including me) are used to.

I think we are getting by with fixed allocations at the moment, because 
we did a lot to get by with it. By working around these limitations.

However, that's just my thinking. Thank you for your inputs.

Regards

Markus Wanner


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: dynamically allocating chunks from shared memory
Следующее
От: Robert Haas
Дата:
Сообщение: Re: dynamically allocating chunks from shared memory