Re: Out of memory on SELECT in 8.3.5

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Out of memory on SELECT in 8.3.5
Дата
Msg-id 20090209204537.GH8123@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: Out of memory on SELECT in 8.3.5  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
* Scott Marlowe (scott.marlowe@gmail.com) wrote:
> I'd do both.  But only after I'd reduced work_mem.  Given that
> reducing work_mem removed the problem, it looks to me like pgsql is
> requesting several large blocks of ram, then only using a small port
> of them.  But overcommit set to 2 means that the OS will not allow an
> overcommit of memory to these allocations, the allocations fail, and
> you get your error.

Reducing work_mem solved the problem by reducing the memory used, sure.
In the end, however, we actually want to make the other 14G or so in
the box useful for something, not just try to fit everything in under
that 10G committed limit.  PG allocates the memory it needs, it doesn't
just allocate whatever work_mem is set to (in fact, I don't believe
work_mem is ever directly used in allocations).

I'm not against looking at lowering work_mem to something else, but you
don't want to suddenly get shifted over to disk-based sorts or similar
when your data set grows too big if there's a bunch of unused memory in
the box.

    Thanks,

        Stephen

Вложения

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

Предыдущее
От: "Matt Magoffin"
Дата:
Сообщение: Re: Out of memory on SELECT in 8.3.5
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Out of memory on SELECT in 8.3.5