Re: Shared memory estimation for postgres

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: leoaaryan <leoaaryan(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Shared memory estimation for postgres
Date: 2016-11-12 11:38:45
Message-ID: 20161112113845.tjrelydv3rd7hctx@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-11-11 09:56:21 +0900, Michael Paquier wrote:
> On Fri, Nov 11, 2016 at 8:40 AM, leoaaryan <leoaaryan(at)gmail(dot)com> wrote:
> > The easiest way to find the value for the shared memory computation is to
> > change the logging level to DEBUG3 and start postgres DB engine and it will
> > give the calculated value in the log file.
> >
> > I believe postgres as a DB needs to be running for any extension to run (I
> > may be wrong here) and I dont want to start the database for this analysis.
> >
> > Please correct me if I'm wrong in my concepts or if I've not understood
> > anything.
>
> Some time ago a patch has been proposed to project to a system view
> the shared memory allocations currently happening on an instance:
> https://www.postgresql.org/message-id/20140504114417.GM12715@awork2.anarazel.de
> This could be plugged into its own extension rather easily. Note
> though that DSM segments (dynamic shared memory) do not have names
> associated to them which would be helpful if you'd like to track that
> as well. But perhaps you don't care much.

FWIW, there's a number of purposes where it'd be more useful to have the
total amount of shared memory output without starting postgres. E.g. to
compute the amount of hugepages to configure as root... I wondered if we
could have a readonly guc that's output by something like -C
total_shared_memory or such (which doesn't start a server...).

Andres

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-11-12 11:43:35 Re: pg_dump, pg_dumpall and data durability
Previous Message Pavan Deolasee 2016-11-12 11:12:41 Re: Patch: Write Amplification Reduction Method (WARM)