Re: High consumns memory

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Anderson Valadares <andervalbh(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: High consumns memory
Date: 2009-06-30 04:30:32
Message-ID: dcc563d10906292130o21ed153cxb5dfd69ce6fb2fe6@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 29, 2009 at 6:14 PM, Anderson Valadares<andervalbh(at)gmail(dot)com> wrote:
> Hi all
>  I have a software developed in Delphi as a Windows Service, but, i don't
> know why, it consumns an unexpected large system memory (515m).
> The service access PostgresSQL by ODBC driver (psqlodbc_08_03_0400) and it
> consist simply of a loop calling a procedure PL/PGSQL. How to discover what
> is causing or why this high memory usage ? What objects are being used on
> this session ?

>   PID USER      PR  NI  VIRT SWAP  RES  SHR DATA CODE S %CPU %MEM    TIME+
> COMMAND
>  9943 postgres  15   0  860m  41m 819m 811m 9604 3540 D 88.3 20.4   0:08.33
> postgres: dbtest test 10.255.100.73(4796) SELECT
> 32731 postgres  16   0  854m 741m 112m 109m 3880 3540 S 12.9  2.8  11:52.47
> postgres: dbtest test 10.255.100.65(57470) idle

Generally speaking, the actual delta for memory usage is the res -
shared memory, which puts both of those backends at using an
individual amount of memory at somewhere in the 5 to 8 meg range. The
rest is shared memory, including shared_buffers and such.

Seeing as you say your shared_buffers is 512M, I'm not sure where the
rest of the shared memory is coming from here in top.

> Mem:   4107392k total,  4103184k used,     4208k free,    49036k buffers
> Swap:  2031608k total,      592k used,  2031016k free,  3698156k cached

Note that your machine is still showing 3.6G or so used for caching
our of 4G, so you're only using an actual amount of about 400 Meg

Are you having any measurable performance issues, or just curious /
worried about what seems like high memory usage? Your numbers look
pretty normal to me otherwise.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mirko Sertic 2009-06-30 06:07:25 Re: Database schema dumper
Previous Message Greg Stark 2009-06-30 03:40:28 Re: masking the code