Re: Many instances of postgres.exe

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Bob Pawley <rjpawley(at)shaw(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Many instances of postgres.exe
Date: 2009-10-15 16:08:46
Message-ID: 4AD7490E.90109@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bob Pawley wrote:
> Hi
>
> While looking at an error message for iexplore.exe, I noticed, on Task
> Manager, that there are 5 or more instances of postgres.exe running.
> Each instance is consuming between 7 to 10 megs of resources, for a
> total of almost 50 megs.
>
> Is this normal behavour?
>
> If so, could someone enlighten me as to the purpose?

A) much of that memory is shared by them. task manager doesn't account
for shared memory

B) on a Linux or Unix system, we might see something like....

$ ps uww -U postgres
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
postgres 3279 0.0 0.5 152036 6000 ? S Sep29 2:59
/usr/bin/postmaster -p 5432 -D /var/lib/pgsql/data
postgres 3587 0.0 0.0 13056 704 ? Ss Sep29 0:04
postgres: logger process
postgres 3630 0.0 10.4 152192 108508 ? Ss Sep29 0:20
postgres: writer process
postgres 3631 0.0 0.0 152192 980 ? Ss Sep29 0:01
postgres: wal writer process
postgres 3632 0.0 0.2 153348 2072 ? Ss Sep29 13:08
postgres: autovacuum launcher process
postgres 3633 0.1 0.1 14196 1500 ? Ss Sep29 36:59
postgres: stats collector process
postgres 27452 0.0 0.1 152740 2028 ? Ss 09:04 0:00
postgres: squeals squeals [local] idle

the first one is the postmaster process, then there is the 'logger', the
'writer', the 'write ahead log writer', the 'autovacuum launcher' and
hte 'stats collector'. Finally, the last process 27452 is a user
connection to database squeals by local user squeals, which is idle.

the first 6 of these will always be running, then one additional process
for each active database connection. While the VIRTUAL size (VSZ) of
most of them is 150MB 'each' on my system, you'll note the RESIDENT SET
SIZE (RSS) is 6M, 700k, 100M, 1M, 2M, 1,5M, 2M. This is much more
representive of the actual memory usage.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Massa, Harald Armin 2009-10-15 16:08:54 Re: Many instances of postgres.exe
Previous Message Brian Modra 2009-10-15 16:07:37 Re: Many instances of postgres.exe