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 -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance