Re: Understanding Postgres Memory Usage

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Understanding Postgres Memory Usage
Дата
Msg-id 13466.1472142457@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Understanding Postgres Memory Usage  (Theron Luhn <theron@luhn.com>)
Ответы Re: Understanding Postgres Memory Usage  (Theron Luhn <theron@luhn.com>)
Список pgsql-general
Theron Luhn <theron@luhn.com> writes:
> I have an application that uses Postgres 9.3 as the primary datastore.

9.3.which?  We do fix memory leaks from time to time ...

> Some of these queries use quite a bit of memory.  I've observed a
> "high-water mark" behavior in memory usage:  running a query increases the
> worker memory by many MBs (beyond shared buffers), but the memory is not
> released until the connection is closed.

Hm.  I'm not familiar with smem, but assuming that that USS column
really is process-private space, that definitely looks bad.

If it's not an outright leak, it's probably consumption of cache space.
We cache stuff that we've read from system catalogs, so sessions that
touch lots of tables (like thousands) can grow due to that.  Another
possible source of large cache consumption is calling lots-and-lots of
plpgsql functions.

If the same query, repeated over and over, causes memory to continue
to grow, I'd call it a leak (ie bug).  If repeat executions consume
no additional memory then it's probably intentional caching behavior.

            regards, tom lane


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Updated RUM-index and support for bigint as part of index
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Updated RUM-index and support for bigint as part of index