Re: Memory Context Info dump

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Memory Context Info dump
Дата
Msg-id CAM-w4HMYKKzMxcuLn5wUjPRZCDEFHOVsVxFwhBpb2DJ8rKECQA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Memory Context Info dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Sep 8, 2015 at 4:30 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> As an example of potentially-more-useful aids, I'm wondering about
> tracking the high-water memory consumption of each memory context.
> (This probably wouldn't be terribly expensive if it were done at the
> granularity of malloc requests rather than individual pallocs.)
> Then perhaps something to log a context's peak usage at context
> destruction time, if it exceeds some threshold or other.


What I've been itching for in my testing is a way to save the memory
context stats, and then later print the difference between them. That
would let me see where memory was actually going to.

There are some cases where that could be tricky. If a context is
destroyed and a new one by the same name is created is it the same
context or a different one? If there are a bunch with the same name
and later there are a bunch but some are the same context and some are
new do we try to match them up, maybe sort by size?

But it would be nice to be able to see right away what context the
extra memory was allocated in between two points.



-- 
greg



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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: pgbench progress with timestamp
Следующее
От: Andres Freund
Дата:
Сообщение: Re: psql tabcomplete - minor bugfix - tabcomplete for SET ROLE TO xxx