pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adarsh Sharma <adarsh.sharma@orkash.com>
To: Tomas Vondra <tv@fuzzy.cz>
Cc: pgsql-performance@postgresql.org
Subject: Re: The right SHMMAX and FILE_MAX
Date: Mon, 02 May 2011 16:31:43 +0530
Message-ID: <4DBE8F17.9060204@orkash.com> (raw)
In-Reply-To: <4DBE8C6B.9070208@fuzzy.cz>
References: <BANLkTinCr_+Hs_zzHPb+tBdtuLFhrsfKdg@mail.gmail.com>
	<4DBE38BB.7040106@orkash.com>
	<4DBE8C6B.9070208@fuzzy.cz>

Tomas Vondra wrote:
> Dne 2.5.2011 06:53, Adarsh Sharma napsal(a):
>   
>> I am also in need of a proper documentation that explains how to set 
>> SHMAX and SHMALL variables in Postgres.
>>
>> What things need to be taken in consideration before doing that ?
>> What is the value of SHMAX & SHMALL if u have 16 GB RAM for Postgres
>> Server ?
>>     
>
> Well, those two values actually define kernel limits for shared memory
> segments (i.e. memory shared by multiple processes, in this case the
> postmaster proces and backends). So it's rather a question of tuning
> shared_buffers (because that's the shared memory segment) and then
> setting those two values.
>   

When I was tuning Postgresql for best Performance, I set my 
shared_buffers= 4096 MB as I set 25% of RAM ( 1/4 )

So Do I need to set my SHMMAX =4096 MB.

What is the SHMALL size now ?

> SHMMAX - max. size of a single shared segment (in bytes)
> SHMALL - total size of shared segments (in pages, page is usually 4kB)
>
> So if you decide you want 1GB shared buffers, you'll need at least this
>
> SHMMAX = 1024 * 1024 * 1024 (i.e. 1GB)
> SHMALL = 1024 * 256 (1GB in 4kB pages)
>
> (althouth the SHMALL should be higher, as there will be other processes
> that need shared memory).
>
> There's a lot of docs about this, e.g. this one (it's mostly for Oracle,
> but it describes the shared memory quite nicely):
>
> http://www.puschitz.com/TuningLinuxForOracle.shtml#SettingSharedMemory
>
> regards
> Tomas
>
>   

view thread (8+ messages)  latest in thread

Message-ID: <4DBE8F17.9060204@orkash.com>
Permalink:  ../4DBE8F17.9060204@orkash.com/
Also on:    postgresql.org/message-id/4DBE8F17.9060204@orkash.com

 · 

reply

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-performance@postgresql.org
  Cc: adarsh.sharma@orkash.com, tv@fuzzy.cz
  Subject: Re: The right SHMMAX and FILE_MAX
  In-Reply-To: <4DBE8F17.9060204@orkash.com>

* 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