Re: excessive amounts of consumed memory (RSS), triggering OOM killer

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: excessive amounts of consumed memory (RSS), triggering OOM killer
Дата
Msg-id 10526.1417480395@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: excessive amounts of consumed memory (RSS), triggering OOM killer  (Tomas Vondra <tv@fuzzy.cz>)
Ответы Re: excessive amounts of consumed memory (RSS), triggering OOM killer  (Tomas Vondra <tv@fuzzy.cz>)
Список pgsql-hackers
Tomas Vondra <tv@fuzzy.cz> writes:
> On 2.12.2014 00:31, Andrew Dunstan wrote:
>> Doesn't this line:
>> TopMemoryContext: 136614192 total in 16678 blocks; 136005936 free
>> (500017 chunks); 608256 used
>> look pretty suspicious?

> It certainly looks a bit large, especially considering this is a fresh
> cluster with a single DB, containing a single table (created by user),
> no doubt about that.
> OTOH, it's "just" 130MB, and the RSS values are ~6GB when the OOM hits.

Yeah, but what was that 130MB being used for?  It's not generally
considered good practice to put large or random stuff in TopMemoryContext
--- arguably, any code doing so is broken already, because almost by
definition such allocations won't be reclaimed on error.

What I suspect you're looking at here is the detritus of creation of a
huge number of memory contexts.  mcxt.c keeps its own state about existing
contents in TopMemoryContext.  So, if we posit that those contexts weren't
real small, there's certainly room to believe that there was some major
memory bloat going on recently.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: bug in json_to_record with arrays
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Turning recovery.conf into GUCs