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 50A1AB86.8020200@2ndQuadrant.com
Whole thread Raw
In response to PostreSQL v9.2 uses a lot of memory in Windows XP  (Wu Ming <rdyf4ever@gmail.com>)
List pgsql-performance
On 11/12/2012 10:17 PM, Wu Ming wrote:
> See this screenshot link from the Process Explorer:
>
> http://i45.tinypic.com/vr4t3b.png
That looks pretty reasonable to me.

The "virtual size" includes the shared memory segment, so the
per-process use is actually much lower than it looks. The real use will
be closer to one of the virtual sizes plus the working sets of all the
rest of the processes. They are processes, not threads.

There may be a genuine issue here, but it isn't demonstrated by the
screenshot.

How do you determine that it's "lagging"? What's the overall system
memory pressure like? Check Task Manager. What's the system's swap
usage? Are there other big processes?

> You can see that there are a lot of threads spawned. Is the threads
> that caused the high memory usage?
PostgreSQL has a process-based architecture. They're processes not
threads. Each process only uses a fairly small amount of memory - the
exact amount depends on settings like work_mem and what the queries
running are doing, but it's usually not much. Most of the apparent use
is shared memory.

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



pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: performance regression with 9.2
Next
From: Gavin Flower
Date:
Subject: Re: Planner sometimes doesn't use a relevant index with IN (subquery) condition