X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 61C6C9FA509 for ; Fri, 5 May 2006 11:12:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 43364-04 for ; Fri, 5 May 2006 11:12:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from morpheus.bostonstock.com (unknown [192.233.205.44]) by postgresql.org (Postfix) with ESMTP id 5E5DD9FA372 for ; Fri, 5 May 2006 11:12:18 -0300 (ADT) Received: by MORPHEUS with Internet Mail Service (5.5.2653.19) id <2R02CBH5>; Fri, 5 May 2006 09:58:04 -0400 Message-ID: <0C4841B42F87D51195BD00B0D020F5CB044B260D@MORPHEUS> From: "mcelroy, tim" To: 'Tom Lane' Cc: pgsql-performance@postgresql.org Subject: Re: Memory and/or cache issues? Date: Fri, 5 May 2006 09:57:58 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6704B.EA36851C" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/109 X-Sequence-Number: 18896 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C6704B.EA36851C Content-Type: text/plain; charset="iso-8859-1" Are you saying the kernel's disc cache may be getting whacked? No, I understand that PG should use as much memory as it can and the system as well. The main problem here is that with almost all the 8GB of RAM 'in use' when I try to do a pg_dump or vacuumdb I run out of memory and the system crashes.... I well understand that unused memory is not a good thing, just that when you have none and can't do the maint work....bad stuff happens. For example, I just created a benchdb on my DEV box with 1,000,000 tuples. As this ran the mem in use jumped up 1G and it hasn't gone down? Once the PG process has finished its task shouldn't it release the memory it used? Thanks, Tim -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Friday, May 05, 2006 9:44 AM To: mcelroy, tim Cc: pgsql-performance@postgresql.org Subject: Re: [PERFORM] Memory and/or cache issues? "mcelroy, tim" writes: > I see this on all the postgres installations, no matter what I > set the postgresql.conf settings to regarding memory allocation, once > postgres starts up 95% of the memory on the box is used. Is there a way > within Linux to 'see' what or who is actually using this memory? Probably kernel disk cache. Are you under the misimpression that unused memory is a good thing? If a Unix-ish system *isn't* showing near zero free memory under load, the kernel is wasting valuable resources. regards, tom lane ------_=_NextPart_001_01C6704B.EA36851C Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [PERFORM] Memory and/or cache issues?

Are you saying the kernel's disc cache may be getting = whacked?  No, I understand that PG should use as much memory as it = can and the system as well.  The main problem here is that with = almost all the 8GB of RAM 'in use' when I try to do a pg_dump or = vacuumdb I run out of memory and the system crashes....

I well understand that unused memory is not a good = thing, just that when you have none and can't do the maint work....bad = stuff happens.  For example, I just created a benchdb on my DEV = box with 1,000,000 tuples.  As this ran the mem in use jumped up = 1G and it hasn't gone down?  Once the PG process has finished its = task shouldn't it release the memory it used?

Thanks,
Tim


 -----Original Message-----
From:   Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent:   Friday, May 05, 2006 9:44 = AM
To:     mcelroy, tim
Cc:     = pgsql-performance@postgresql.org
Subject:        = Re: [PERFORM] Memory and/or cache issues?

"mcelroy, tim" = <tim.mcelroy@bostonstock.com> writes:
> I see this on all the postgres installations, = no matter what I
> set the postgresql.conf settings to regarding = memory allocation, once
> postgres starts up 95% of the memory on the box = is used.  Is there a way
> within Linux to 'see' what or who is actually = using this memory?

Probably kernel disk cache.  Are you under the = misimpression that unused
memory is a good thing?  If a Unix-ish system = *isn't* showing near zero
free memory under load, the kernel is wasting = valuable resources.

        =         =         regards, tom = lane

------_=_NextPart_001_01C6704B.EA36851C--