Re: Too many postgres.exe

From: Scott Mead <scott(dot)lists(at)enterprisedb(dot)com>
To: A(dot)Bhattacharya(at)sungard(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Too many postgres.exe
Date: 2009-12-15 14:10:15
Message-ID: d3ab2ec80912150610n27c6b19sbbfb757e20a9d1f0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 15, 2009 at 4:51 AM, <A(dot)Bhattacharya(at)sungard(dot)com> wrote:

> Hi All,
>
>
>
> I have my application UI in Java and which is communicating with Postgresql
> database.
>
> However whenever my application is running I could see there are too many
> postgres.exe are created even though the application is not doing anything
> in database.
>
Remember, every connection gets a 'postgres.exe' (dedicated backend per
connection). And it'll stick around until you close the connection. If you
create a connection and don't close it until the DB goes away, then you'll
still have the backend process there even though you're not doing anything.

Can you describe what you consider 'Too Many?' The process-per-connection
architecture is very common (albeit not on windows), so I'm curious what
your threshold is.

>
>

>
> In general the observation is that there are too many progress.exe
> processes get created every time I run my application and it postgres.exe
> eats up the maximum memory.
>

You'll need to use sysinternals tools here, task manager mis-reports how
much memory is actually being allocated by postgres. This is because each
postgres.exe is attaching to a shared memory area. This means that you
could be using 2 GB of memory (total) for your postgres database, when it
looks like you're using 20 GB of memory. (10 backends all showing 2 GB).
The reality is... you're not using (mem * num of postgres.exe), you should
use sysinternals tools to discern how much memory is shared vs. per-backend.

--Scott

>
>
> Any help/suggestion please!!
>
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter 2009-12-15 14:35:21 PlPerl scope issue
Previous Message Josh Kupershmidt 2009-12-15 14:04:06 Re: 8.3 PL/pgSQL comparing arbitrary records