Re: out of memory woes

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: out of memory woes
Дата
Msg-id 20061220143329.GF30769@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: out of memory woes  ("Angva" <angvaw@gmail.com>)
Список pgsql-general
Angva wrote:
> We found that the kernel setting SHMALL was set ridiculously high -
> 1024g!. Someone noticed this when running "ipcs -lm" - seemed just a
> tad off. :)

That's not a problem because it's just a limit.  It won't cause out of
memory or anything.

The problem with work_mem is that the system may request that much
memory for every Sort step.  Each query may have more than one of those,
and each backend can be serving more than one query at a time.  So those
200000 you have quickly turn into the gigabytes and consume the whole of
your RAM.

If a Sort step requires more than work_mem for its work, it will go to
disk -- but in a much faster way than what the kernel is able to do with
swap.  So whenever you are trading work_mem for swap, you are losing big
time.  You should decrease that figure.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: "Christian Maier"
Дата:
Сообщение: plperl trigger problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: plperl trigger problem