From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sebastian Gabbert <pg@huehnerhose.de>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: backend proccess memory accumulates
Date: Thu, 22 Nov 2018 11:26:31 -0500
Message-ID: <5455.1542903991@sss.pgh.pa.us> (raw)
In-Reply-To: <6E65FD77-6FA1-485E-AEF2-318B56964255@huehnerhose.de>
References: <6E65FD77-6FA1-485E-AEF2-318B56964255@huehnerhose.de>
Sebastian Gabbert <pg@huehnerhose.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
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: tgl@sss.pgh.pa.us, pg@huehnerhose.de, pgsql-admin@lists.postgresql.org
Subject: Re: backend proccess memory accumulates
In-Reply-To: <5455.1542903991@sss.pgh.pa.us>
* 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