Re: Postgres filling up hard drive with swap files

From: Joe Lester <joe_lester(at)sweetwater(dot)com>
To: postgres list <pgsql-general(at)postgresql(dot)org>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, Bill Moran <wmoran(at)potentialtech(dot)com>
Subject: Re: Postgres filling up hard drive with swap files
Date: 2004-08-20 18:33:21
Message-ID: 69C06FBA-F2D7-11D8-BDD7-000A95A58EA0@sweetwater.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> How many Postgres processes are running?

146 right now. Most of them are idle at any given point in time.

> Does this number increase with
> the memory usage.

No. There are 140 - 150 postgres processes running on average, but the
memory usage keeps going up and up.

> Simple fact of the matter is that you have apparently found a memory
> leak. How Mac OS X deals with swapping is (more or less) unimportant.

Wow, I sure hope not. I was really hoping to take care of the problem.

> I'm wondering, however, if you have a connection leak instead. i.e.
> is it possible that your client application is opening a whole bunch
> of connections and never closing them?

No. The clients open only one connection (and hang onto it for dear
life :-).

> You did show that you have
> a max # of connection of 200. That's pretty high, unless you've got
> a lot of RAM in that machine.

I have 512 MB of RAM in the machine. The server is performing
wonderfully. It's just that the swap files keep sprouting like weeds.

> A more accurate description of the problem would be:
> How many connections are actually open?

146 right now. That's about average.

> How much memory is actually in use by Postgres processes? (The amount
> of
> swap in use is unimportant to the Postgres folks, it's an OS thing)

This is where I could use some pointers. The following line is a top
entry for a single postgres process. Hope that helps.

PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE
VSIZE
14235 postgres 0.0% 0:01.36 1 9 33 880K 16.9M 9.62M
60.0M

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2004-08-20 19:01:41 Re: 7.4.5 release
Previous Message Jeff 2004-08-20 18:28:43 Re: Postgres filling up hard drive with swap files