Re: Understanding Postgres Memory Usage

From: Kevin Grittner <kgrittn(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Theron Luhn <theron(at)luhn(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Understanding Postgres Memory Usage
Date: 2016-08-25 18:34:46
Message-ID: CACjxUsOD=kaPArB5DTy_TxWiyxv5Lrs0+7Vk7WY0WYke1D3OGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Aug 25, 2016 at 1:25 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Hmm. I find it mighty suspicious that the USS, PSS, and RSS numbers are
> all increasing to pretty much the same tune, ie from very little to circa
> 100MB. I think there is a decent chance that smem is not doing what it
> says on the tin, and in fact is including shared memory consumption in
> "USS". In which case the apparent leak just corresponds to the process
> gradually touching more and more of the shared buffer arena. (If your
> shared_buffers settings is not somewhere near 100MB, then this theory
> breaks down.)

I can't speak to every implementation of smem, but I have used it
quite a bit under SLES and Ubuntu, and it always seemed to do what
it says -- USS is unshared (process-local) memory and PSS is that
plus the process's portion of shared memory. (The sum of
differences between PSS and USS == total shared memory.) RSS has
the usual meaning.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Theron Luhn 2016-08-25 18:45:31 Re: Understanding Postgres Memory Usage
Previous Message Tom Lane 2016-08-25 18:25:45 Re: Understanding Postgres Memory Usage