From: Scott Marlowe <smarlowe@g2switchworks.com>
To: adey <adey11@gmail.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Cc: PostgreSQL Admin <postgres@productivitymedia.com>
Cc: postgresql-l <postgresql-l@Groups.ittoolbox.com>
Subject: Re: What's using all my RAM?
Date: Wed, 02 Aug 2006 11:34:59 -0500
Message-ID: <1154536499.7882.51.camel@state.g2switchworks.com> (raw)
In-Reply-To: <1c66bda80608012109x125180eeh38674c853ea50434@mail.gmail.com>
References: <1c66bda80608012109x125180eeh38674c853ea50434@mail.gmail.com>
On Tue, 2006-08-01 at 23:09, adey wrote:
> Please could someone tell me how to discover what is using all of my
> RAM?
> I am trying to run a vacuum against Postgres, but it fails immediately
> with:-
>
> "ERROR: out of memory
> DETAIL: Failed on request of size 1073741820."
>
> TOP shows the following:-
> Mem: 4077544k total, 3897868k used, 179676k free, 146960k
> buffers
> Swap: 2000084k total, 440k used, 1999644k free, 3352892k
> cached
> None of the listed processes appear to be using more than 1 or 2% MEM.
nothing is using your ram in the traditional sense.You're kernel is
caching files in the space that's not currently being used by
applications. note that you show 3897868k used, and 3352892k cached.
So, the actual memory being use by applications is the in use minus the
cached, or about 544,000k. The rest is actually available, and the
kernel will gladly give it back if a program needs it.
You actual problem here is that your machine is trying to allocate
approx 1 Gig at once. Large allocations tend to point towards some kind
of data corruption in your database, but not always.
Try a vacuuming each table one at a time to see which one is causing
this error (if it's not already in the error message and got edited
away.) See if a select of all rows on that table gets the same error
message.
> Postgres v7.4.2 (upgrade underway)
If you can get a clean backup, look into at least 8.0. There were huge
improvements from 7.4 to 8.0. 8.1 is even more impressive. (says the DBA
who's still running 7.4.13 on all his boxes... :)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: smarlowe@g2switchworks.com, adey11@gmail.com, postgres@productivitymedia.com, postgresql-l@Groups.ittoolbox.com
Subject: Re: What's using all my RAM?
In-Reply-To: <1154536499.7882.51.camel@state.g2switchworks.com>
References: <1c66bda80608012109x125180eeh38674c853ea50434@mail.gmail.com> <1154536499.7882.51.camel@state.g2switchworks.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox