From: Mike Rylander <mrylander@gmail.com>
To: pgsql general <pgsql-general@postgresql.org>
Subject: Re: Memory Leakage Problem
Date: Thu, 8 Dec 2005 03:46:02 +0000
Message-ID: <b918cf3d0512071946m3cbfc630y679e0350a7f6b864@mail.gmail.com> (raw)
In-Reply-To: <c10e7feb0512071825h30c93c00kdf5ea2a11e613f0b@mail.gmail.com>
References: <c10e7feb0512060122u33a9c8eakb178525f3834b00@mail.gmail.com>
<1133891282.11803.7.camel@state.g2switchworks.com>
<c10e7feb0512061816o21305ac7n576694f2624dc6ed@mail.gmail.com>
<1133991204.11803.43.camel@state.g2switchworks.com>
<c10e7feb0512071825h30c93c00kdf5ea2a11e613f0b@mail.gmail.com>
On 12/8/05, Kathy Lo <kathy.lo.ky@gmail.com> wrote:
[snip]
> When the user complains the system becomes very slow, I use top to
> view the memory statistics.
> In top, I cannot find any processes that use so many memory. I just
> found that all the memory was used up and the Swap memory nearly used
> up.
Not to add fuel to the fire, but I'm seeing something similar to this
on my 4xOpteron with 32GB of RAM running Pg 8.1RC1 on Linux (kernel
2.6.12). I don't see this happening on a similar box with 16GB of RAM
running Pg 8.0.3. This is a lightly used box (until it goes into
production), so it's not "out of memory", but the memory usage is
climbing without any obvious culprit. To cut to the chase, here are
some numbers for everyone to digest:
total gnu ps resident size
# ps ax -o rss|perl -e '$x += $_ for (<>);print "$x\n";'
5810492
total gnu ps virual size
# ps ax -o vsz|perl -e '$x += $_ for (<>);print "$x\n";'
10585400
total gnu ps "if all pages were dirtied and swapped" size
# ps ax -o size|perl -e '$x += $_ for (<>);print "$x\n";'
1970952
ipcs -m
# ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x0052e2c1 1802240 postgres 600 176054272 26
(that's the entire ipcs -m output)
and the odd man out, free
# free
total used free shared buffers cached
Mem: 32752268 22498448 10253820 0 329776 8289360
-/+ buffers/cache: 13879312 18872956
Swap: 31248712 136 31248576
I guess dstat is getting it's info from the same source as free, because:
# dstat -m 1
------memory-usage-----
_used _buff _cach _free
13G 322M 8095M 9.8G
Now, I'm not blaming Pg for the apparent discrepancy in calculated vs.
reported-by-free memory usage, but I only noticed this after upgrading
to 8.1. I'll collect any more info that anyone would like to see,
just let me know.
If anyone has any ideas on what is actually happening here I'd love to
hear them!
--
Mike Rylander
mrylander@gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org
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-performance@postgresql.org
Cc: mrylander@gmail.com, pgsql-general@postgresql.org
Subject: Re: Memory Leakage Problem
In-Reply-To: <b918cf3d0512071946m3cbfc630y679e0350a7f6b864@mail.gmail.com>
References: <c10e7feb0512060122u33a9c8eakb178525f3834b00@mail.gmail.com> <1133891282.11803.7.camel@state.g2switchworks.com> <c10e7feb0512061816o21305ac7n576694f2624dc6ed@mail.gmail.com> <1133991204.11803.43.camel@state.g2switchworks.com> <c10e7feb0512071825h30c93c00kdf5ea2a11e613f0b@mail.gmail.com> <b918cf3d0512071946m3cbfc630y679e0350a7f6b864@mail.gmail.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