Re: dynamically allocating chunks from shared memory

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: dynamically allocating chunks from shared memory
Дата
Msg-id AANLkTimQk=KK4hxP3ufbm1VOOUfOmRZYEx+txCJAh4T7@mail.gmail.com
обсуждение исходный текст
Ответ на Re: dynamically allocating chunks from shared memory  (Markus Wanner <markus@bluegap.ch>)
Ответы Re: dynamically allocating chunks from shared memory  (Markus Wanner <markus@bluegap.ch>)
Список pgsql-hackers
On Mon, Aug 9, 2010 at 2:28 PM, Markus Wanner <markus@bluegap.ch> wrote:
> Another issue to be discussed would be the limits of sharing free memory
> between subsystems. Maybe we even reach the conclusion that we absolutely
> *want* fixed maximum sizes for every single subsystem so as to be able to
> guarantee a certain amount of multi-xact or SLRU entries at any point in
> time (otherwise one memory hungry subsystem could possibly eat it all up
> with another subsystem getting the OOM error when trying to allocate for its
> very first entry).

Yeah, I think that's a real concern.  I think we need to distinguish
memory needs from memory wants.  Ideally, we'd like our entire
database to be cached in RAM.  But that may or may not be feasible, so
we page what we can into shared_buffers and page out as necessary to
make room for other things.  In contrast, the traditional malloc()
approach doesn't give you much flexibility: if it returns NULL, you
pretty much have to fail whatever operation you were trying to
perform.  For some things, that's OK.  For other things, it's not.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


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

Предыдущее
От: Markus Wanner
Дата:
Сообщение: Re: dynamically allocating chunks from shared memory
Следующее
От: Peter Eisentraut
Дата:
Сообщение: host name support in pg_hba.conf