From: Craig Ringer <craig@2ndQuadrant.com>
To: Wu Ming <rdyf4ever@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: PostreSQL v9.2 uses a lot of memory in Windows XP
Date: Tue, 13 Nov 2012 10:08:06 +0800
Message-ID: <50A1AB86.8020200@2ndQuadrant.com> (raw)
In-Reply-To: <CAE5Kd6KYScFFupxtXBVvtXdo4mDykkmKnogs8E5AB7Xe+Kwykg@mail.gmail.com>
References: <CAE5Kd6KYScFFupxtXBVvtXdo4mDykkmKnogs8E5AB7Xe+Kwykg@mail.gmail.com>
On 11/12/2012 10:17 PM, Wu Ming wrote:
> See this screenshot link from the Process Explorer:
>
> http://i45.tinypic.com/vr4t3b.pngThat 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
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: craig@2ndQuadrant.com, rdyf4ever@gmail.com
Subject: Re: PostreSQL v9.2 uses a lot of memory in Windows XP
In-Reply-To: <50A1AB86.8020200@2ndQuadrant.com>
* 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