Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

From: Mel Llaguno <mllaguno(at)coverity(dot)com>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax
Date: 2013-02-07 05:43:33
Message-ID: E1FB7FBAE29E634FA58D6CC0D59F288B11EF73D7@CH1PRD0511MB442.namprd05.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Pavan,

Thanks. I'll have a look at the source code.

M.
________________________________________
From: Pavan Deolasee [pavan(dot)deolasee(at)gmail(dot)com]
Sent: Wednesday, February 06, 2013 10:41 PM
To: Mel Llaguno
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax

On Thu, Feb 7, 2013 at 11:01 AM, Mel Llaguno <mllaguno(at)coverity(dot)com> wrote:
> Having to guess this value is far from ideal; what I'd like is the formula used by postgresql that generates the shmget() value displayed in the pgctl.log.
>

There is no easy way or at least none that I'm aware of, to get the
exact value of shared memory needed for Postgres. If you have access
to the source code, you can look at CreateSharedMemoryAndSemaphores()
function in src/backend/storage/ipc/ipci.c to see what all goes in
determining the size for shmget()

Thanks,
Pavan

--
Pavan Deolasee
http://www.linkedin.com/in/pavandeolasee

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2013-02-07 05:49:29 Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax
Previous Message Pavan Deolasee 2013-02-07 05:41:46 Re: PostgreSQL's share_buffer calculation using shmget() versus kernel.shmmax