Re: PostreSQL v9.2 uses a lot of memory in Windows XP

From: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Wu Ming <rdyf4ever(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: PostreSQL v9.2 uses a lot of memory in Windows XP
Date: 2012-11-14 12:04:52
Message-ID: CAEYLb_Xz=jOKdkLmZcPK45Hs7X_CEbE5iX89=hUJ_LfWL=QKYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 14 November 2012 06:47, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> Yes, it's absurd that it's so hard to work out how much memory Pg uses. It'd
> be nice if Pg provided better tools for this by allowing the postmaster to
> interrogate backends' memory contexts, though that'd only report how much
> memory Pg thought it was using, not how much memory it was actually using
> from the OS. Really, OS-specific tools are required, and nobody's written
> them - at least, I'm not aware of any that've been published.

I wrote a GDB Python script that interrogates a running backend about
memory context information, walking a tree of contexts, which is based
almost entirely on standard infrastructure used by
MemoryContextStats(). It's quite possible. You're quite right to say
that OS-specific tools would probably do a more satisfactory job,
though, particularly if you're not interested in *what* Postgres is
doing with memory, but need to summarise it usefully.

--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jon Nelson 2012-11-14 14:41:45 Re: postgres 8.4, COPY, and high concurrency
Previous Message Craig Ringer 2012-11-14 06:47:36 Re: PostreSQL v9.2 uses a lot of memory in Windows XP