Re: Huge amount of memory consumed during transaction

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Huge amount of memory consumed during transaction
Дата
Msg-id 20071017204058.GR5737@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Huge amount of memory consumed during transaction  (henk de wit <henk53602@hotmail.com>)
Ответы Re: Huge amount of memory consumed during transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
henk de wit escribió:
> > How is the memory consumed?  How are you measuring it? I assume you
> > mean the postgres process that is running the query uses the memory.
> > If so, which tool(s) are you using and what's the output that shows it
> > being used?
>
> It's periodically measured and recorded by a script from which the relevant parts are:
>
> GET_VSZ="ps aux | grep $REQ_GREP | grep -v grep | grep -v $$ | awk '{print \$5}'
>  | sort -n | tail -n1";
> GET_RSS="ps aux | grep $REQ_GREP | grep -v grep | grep -v $$ | awk '{print \$6}'
>  | sort -n | tail -n1";

Huh, this seems really ugly, have you tried something like just

$ ps -o cmd:50,vsz,rss -C postmaster
CMD                                                   VSZ   RSS
/pgsql/install/00head/bin/postmaster                51788  3992
postgres: writer process                            51788  1060
postgres: wal writer process                        51788   940
postgres: autovacuum launcher process               51924  1236
postgres: stats collector process                   22256   896


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

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

Предыдущее
От: Chris Kratz
Дата:
Сообщение: Re: Incorrect estimates on columns
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Huge amount of memory consumed during transaction