From: Phan Công Minh <cphan@hsr.ch>
To: Clinton Adams <clinton.adams@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Check memory consumption of postgresql query
Date: Mon, 12 May 2014 07:02:54 +0000
Message-ID: <b6da0a8aed5d4dc9aeee3017f088db64@sid00230.hsr.ch> (raw)
In-Reply-To: <CAEuopLbNRe0qe8-7kC-6OmH7Jx_q0hWXwmeo83TCTsgve0rOGA@mail.gmail.com>
References: <189738B9D30E5844A2F72AF45DD82A490C638ABB@SID00202.hsr.ch>
<CAEuopLbNRe0qe8-7kC-6OmH7Jx_q0hWXwmeo83TCTsgve0rOGA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
Hi Clinton,
Thank you for your response. I check the article (http://www.depesz.com/2012/06/09/how-much-ram-is-postgresql-using/) and it seems to work with general process as well.
However does it have anyway to calculate the memory used by single query, not the whole postgresql process?
Thanks,
Minh
________________________________________
From: Clinton Adams <clinton.adams@gmail.com>
Sent: Thursday, May 8, 2014 4:04 PM
To: Phan Công Minh
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Check memory consumption of postgresql query
On Thu, May 8, 2014 at 3:04 AM, Phan Công Minh <cphan@hsr.ch> wrote:
> Hello PostgreSQL community ,
>
> I'm doing benchmark between column store and traditional row-oriented store.
> I would like to know if there is any way to measure memory consummed by a
> query execution?
In linux you can look at the memory usage for a particular backend in
/proc/[pid]/smaps. Get the pid with pg_backend_pid() or from
pg_stat_activity.
For more info, check out
http://www.depesz.com/2012/06/09/how-much-ram-is-postgresql-using/
- Clinton
>
> Thanks
> Minh,
>
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: cphan@hsr.ch, clinton.adams@gmail.com
Subject: Re: Check memory consumption of postgresql query
In-Reply-To: <b6da0a8aed5d4dc9aeee3017f088db64@sid00230.hsr.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox