Re: Postgres utils chewing RAM

From: Steve Lane <slane(at)fmpro(dot)com>
To: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres utils chewing RAM
Date: 2002-04-29 15:37:54
Message-ID: B8F2D302.C933%slane@fmpro.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/29/02 12:53 AM, "Neil Conway" <nconway(at)klamath(dot)dyndns(dot)org> wrote:

> On Mon, 29 Apr 2002 00:35:38 -0500
> "Steve Lane" <slane(at)fmpro(dot)com> wrote:
>> I traced through the nightly scripts and found that two things seem to
>> account for the memory loss -- vacuuming the databases, and backing them up.
>> I restarted to free all my RAM back up and tried just those operations. Sure
>> enough, after a vacuum verbose analyze (on about thirty tables totaling
>> probably less than 50 MB of data), free memory dropped by 130MB. Backing up
>> everything on the server took another 110MB. And this memory never gets
>> returned.
>
> AFAICS, there's nothing wrong here. Linux, like any modern OS, will use
> free RAM to cache I/O. Apparently, when these database maintainence/
> backup utilities are executed, a lot of I/O is generated, and Linux
> decides to use some of the spare RAM to cache it. The "free RAM"
> number is pretty useless in this regard.
>
> As for returning this memory, Linux should return it if any
> applications actually need it.
>
> If you're concerned, run "vmstat 1". If you see any paging under
> normal load, you've got a problem -- look into upgrading your
> kernel, you might have an early 2.4 kernel with a defective
> VM. If you don't see any paging, you're fine -- don't worry
> about it.

Okay, I am both educated and reassured. I need to look further into things
like vmstat and figuring out how Postgres is using shared memory. My
performance issue involves slow response from Apache (running PHP tied to
postgres). So I need to keep looking.

Thanks,

steve

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Michel POURE 2002-04-29 15:45:08 Performance HOWTO - pseudo counter example
Previous Message Steve Lane 2002-04-29 15:35:56 Re: Postgres utils chewing RAM