Re: backend proccess memory accumulates

From: Sebastian Gabbert <pg(at)huehnerhose(dot)de>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: backend proccess memory accumulates
Date: 2018-11-22 17:31:41
Message-ID: 06C7C470-1998-418D-8D5D-A1C97E73163E@huehnerhose.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks for the reply, but I think i sorted this out, that was why i spoke of “RES”. As far as I understand memory stats shown by top or glances there are two columns, one for “virtual memory” (top->Size, glances->VIRT) and one for residential memory (RES in both cases). And my understanding is that virtual shows the memory including shared memory chunks, RES shows the actually used memory by this process alone.
I absolutely could be wrong in my interpretation - since I read at many places that theses distinctions are difficult.

Bottom line is: My server swapes and pagedeamon is one of the busiest processes :) So RAM is used in vast amounts.

> On 22. Nov 2018, at 17:26, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Sebastian Gabbert <pg(at)huehnerhose(dot)de> writes:
>> Postgres is running on a dedicated FreeBSD 11.2 server with 32GB of RAM, there is a second server in hot standby / wal replication. My “worker” processes, mainly php processes, connect through pgbouncer (session mode).
>
>> What I observed is that there are, at any time, around 10-15 postgres backend processes on my main db server consuming around 4GB of memory (RES in glances) each. These processes keep this footprint until pgbouncer closes the connection.
>
> That is, most likely, almost entirely shared space (shared buffers and so
> on). Sorting out how much is shared and how much is actually per-process
> memory can be tricky, because most Unix process monitoring tools aren't
> very good about showing the difference. I don't use FreeBSD enough to be
> sure how to tell the difference with its tools --- but you can't get
> anywhere with diagnosing PG's true memory consumption until you've got a
> handle on that.
>
> It would be interesting to know what you've got shared_buffers set to
> on this server, though.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rui DeSousa 2018-11-22 18:48:04 Re: backend proccess memory accumulates
Previous Message Tom Lane 2018-11-22 16:26:31 Re: backend proccess memory accumulates