postgres memory management issues?

Поиск
Список
Период
Сортировка
От Richard Yen
Тема postgres memory management issues?
Дата
Msg-id ADDEA1D0-FEEF-4FAD-950E-BC9E49439DF0@richyen.com
обсуждение исходный текст
Ответы Re: postgres memory management issues?  (Richard Huxton <dev@archonet.com>)
Re: postgres memory management issues?  ("Claus Guttesen" <kometen@gmail.com>)
Re: postgres memory management issues?  (Gregory Stark <stark@enterprisedb.com>)
Re: postgres memory management issues?  (Michael Stone <mstone+postgres@mathom.us>)
Re: postgres memory management issues?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Hi All,

I've recently run into problems with my kernel complaining that I ran
out of memory, thus killing off postgres and bringing my app to a
grinding halt.

I'm on a 32-bit architecture with 16GB of RAM, under Gentoo Linux.
Naturally, I have to set my shmmax to 2GB because the kernel can't
support more (well, I could set it to 3GB, but I use 2GB for safety).

Shared_buffers is 200000 and max_connections is 600.

Here is a snippet of my log output (I can give more if necessary):
Sep  5 18:38:57 tii-db2.oaktown.iparadigms.com Out of Memory: Kill
process 11696 (postgres) score 1181671 and children.
Sep  5 18:38:57 tii-db2.oaktown.iparadigms.com Out of Memory: Kill
process 11696 (postgres) score 1181671 and children.
Sep  5 18:38:57 tii-db2.oaktown.iparadigms.com Out of memory: Killed
process 11704 (postgres).
Sep  5 18:38:57 tii-db2.oaktown.iparadigms.com Out of memory: Killed
process 11704 (postgres).
[...]
Sep  5 18:38:57 tii-db2.oaktown.iparadigms.com postgres[11696]: [6-1]
2007-09-05 18:38:57.626 PDT [user=,db=  PID:11696 XID:]LOG:
background writer process (PID 11704) was terminated by signal 9
Sep  5 18:38:57 tii-db2.oaktown.iparadigms.com postgres[11696]: [7-1]
2007-09-05 18:38:57.626 PDT [user=,db=  PID:11696 XID:]LOG:
terminating any other active server processes

My understanding is that if any one postgres process's memory usage,
plus the shared memory, exceeds the kernel limit of 4GB, then the
kernel will kill the process off.  Is this true?  If so, would
postgres have some prevention mechanism that would keep a particular
process from getting too big?  (Maybe I'm being too idealistic, or I
just simply don't understand how postgres works under the hood)

--Richard

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

Предыдущее
От: Florian Weimer
Дата:
Сообщение: Re: Performance on 8CPU's and 32GB of RAM
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: postgres memory management issues?