Re: Postgres utils chewing RAM

From: Steve Lane <slane(at)fmpro(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres utils chewing RAM
Date: 2002-04-29 15:35:56
Message-ID: B8F2D28C.C932%slane@fmpro.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/29/02 12:53 AM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Steve Lane <slane(at)fmpro(dot)com> writes:
>> I seem to be having a problem with the postgres utilities chewing a lot of
>> RAM. I've been running PG 7.1 under LinuxPPC on a PowerMac G4. After a few
>> days of use, free memory degrades to almost nothing.
>
> This is wrong?

Apparently not :->

Performance on the server seems to slowly degrade over time. I made the
naïve assumption that this correlated with free memory. This proceeded from
an almost (but not completely) absolute ignorance of how Unix manages
memory.

I am, suffice to say, educated.
>
> On most Unixen, the kernel happily uses all spare RAM to cache
> recently-accessed disk blocks. If you've got large amounts of "free"
> RAM it only means that (a) you rebooted recently, or (b) you're not
> doing much disk access.

> This all sounds like standard, expected, preferable behavior.
>
> As soon as you run programs that need RAM, the kernel will drop those
> disk-cache pages and assign the RAM to program space. But as long as
> you don't, what else should the kernel do with unused RAM than keep disk
> cache in it?
>

OK, I need to a) learn more about memory management and b) dig deeper into
my (apparent) performance issues.

Thanks for the primer.

-- sgl

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Lane 2002-04-29 15:37:54 Re: Postgres utils chewing RAM
Previous Message Tom Lane 2002-04-29 15:25:11 Re: pid gets overwritten in OSX