Re: PostreSQL v9.2 uses a lot of memory in Windows XP - Mailing list pgsql-performance

From Craig Ringer
Subject Re: PostreSQL v9.2 uses a lot of memory in Windows XP
Date
Msg-id 50A2D294.5090702@2ndQuadrant.com
Whole thread Raw
In response to PostreSQL v9.2 uses a lot of memory in Windows XP  (Wu Ming <rdyf4ever@gmail.com>)
Responses Re: PostreSQL v9.2 uses a lot of memory in Windows XP
List pgsql-performance
Please reply to the list, not directly to me. Comments follow in-line.

On 11/13/2012 11:37 PM, Wu Ming wrote:
> Hi,
>
> What column in Process Explorer to determine memory usage? Currently I
> thought "Working Set" is the correct one.
As I said, it just isn't that simple when shared memory is involved. A
rough measure for PostgreSQL is the "virtual size" of one of the
processes, plus the working sets of all the others. Alternately, you can
reasonably estimate the memory consumption by adding all the working
sets and then adding the value of shared_buffers to that - this will
under-estimate usage slightly because PostgreSQL also uses shared memory
for other things, but not tons of it in a normal configuration.
> The 'lagging' is like when you try to alt+tab or activating/focusing
> other application window, or changing tab in browser, it goes slow or
> lagged in its UI loading.
Sure, that's what you see, but you should really be looking at the
numbers. Swap in and out bytes, memory usage, etc. In Windows 7 or
Win2k8 Server you'd use the Performance Monitor for that; I don't
remember off the top of my head where to look in XP.
> My firefox has many tabs opened (around 30 tabs) and eclipse is well
> known as its high memory usage.
On a 2GB machine? Yup, that'll do it.

You've shown a screenshot that suggests that Pg is using relatively
little RAM, and you're running two known memory pigs. I'd say your
problem has nothing to do with PostgreSQL.
> Then usually I also opened opera and
> chrome with ~10-20 tabs opened.
Time to buy more RAM.
> I saw that chrome also spawned many
> process (I had 4 tabs opened, but it shows 8 child process). They
> might be the big process that probably is the main cause of the
> lagging.
It's going to be everything adding up. Chrome, Eclipse, Firefox, all
fighting for RAM.

BTW, chrome uses a multi-process architecture like PostgreSQL, but
unlike PostgreSQL it does not use shared memory, so you can tell how
much RAM Chrome is using very easily by adding up the working sets.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



pgsql-performance by date:

Previous
From: Jeff Janes
Date:
Subject: Re: postgres 8.4, COPY, and high concurrency
Next
From: Jon Nelson
Date:
Subject: Re: postgres 8.4, COPY, and high concurrency