Re: Huge amount of memory consumed during transaction - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: Huge amount of memory consumed during transaction
Date
Msg-id 20071017204058.GR5737@alvh.no-ip.org
Whole thread Raw
In response to Re: Huge amount of memory consumed during transaction  (henk de wit <henk53602@hotmail.com>)
Responses Re: Huge amount of memory consumed during transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Chris Kratz
Date:
Subject: Re: Incorrect estimates on columns
Next
From: Tom Lane
Date:
Subject: Re: Huge amount of memory consumed during transaction