pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Craig Ringer <craig@2ndQuadrant.com>
To: Aaron Bono <aaron.bono@aranya.com>
Cc: Postgres <pgsql-admin@postgresql.org>
Subject: Re: Postgre Eating Up Too Much RAM
Date: Wed, 14 Nov 2012 11:02:50 +0800
Message-ID: <50A309DA.2040702@2ndQuadrant.com> (raw )
In-Reply-To: <CAHfMse1Z+HGnDJ+2may-7vQgOcogjzuGYASB7yPE2CjAmGyCaQ@mail.gmail.com >
References: <CAHfMse1Z+HGnDJ+2may-7vQgOcogjzuGYASB7yPE2CjAmGyCaQ@mail.gmail.com >
On 11/14/2012 06:12 AM, Aaron Bono wrote:
>
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> ....
> postgres 3523 0.5 1.0 426076 313156 ? Ss 08:44 2:42 \_
> postgres: myuser my_db 192.168.1.2(39786) idle
>
> postgres 3820 0.4 0.9 418988 302036 ? Ss 09:04 2:11 \_
> postgres: myuser my_db 192.168.1.2(52110) idle
>
> postgres 3821 0.1 0.5 391452 178972 ? Ss 09:04 0:44 \_
> postgres: myuser my_db 192.168.1.2(52111) idle
>
> postgres 3822 0.0 0.0 369572 9928 ? Ss 09:04 0:00 \_
> postgres: myuser my_db 192.168.1.2(52112) idle
>
> postgres 3823 0.2 0.6 383368 202312 ? Ss 09:04 1:12 \_
> postgres: myuser my_db 192.168.1.2(52114) idle
>
> postgres 3824 0.0 0.0 369320 8820 ? Ss 09:04 0:00 \_
> postgres: myuser my_db 192.168.1.2(52115) idle
>
> postgres 3825 0.4 0.8 413964 257040 ? Ss 09:04 1:54 \_
> postgres: myuser my_db 192.168.1.2(52116) idle
>
>
> Am I reading this right? Are there individual connections using over
> 300 MB or RAM by themselves?
If I recall correctly, RSS is charged against a PostgreSQL back-end when
it touches `shared_buffers`. So that doesn't necessarily mean that the
back-end is using the full amount of memory listed as RSS.
Yes, measuring how much memory Pg uses is seriously frustrating because
OS accounting for shared memory is so bad.
See http://www.depesz.com/2012/06/09/how-much-ram-is-postgresql-using/
--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
view thread (14+ messages) latest in thread
Message-ID: <50A309DA.2040702@2ndQuadrant.com>
Permalink: ../50A309DA.2040702@2ndQuadrant.com/
Also on: postgresql.org/message-id/50A309DA.2040702@2ndQuadrant.com
copy link · copy postgr.es
reply 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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: craig@2ndQuadrant.com, aaron.bono@aranya.com
Subject: Re: Postgre Eating Up Too Much RAM
In-Reply-To: <50A309DA.2040702@2ndQuadrant.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