Re: shared memory settings: SHMMAX and SHMALL - Mailing list pgsql-general

From Tatsuo Ishii
Subject Re: shared memory settings: SHMMAX and SHMALL
Date
Msg-id 20010315211532B.t-ishii@sra.co.jp
Whole thread Raw
In response to shared memory settings: SHMMAX and SHMALL  (Gregory Bittar <gbittar@iqa.cc>)
List pgsql-general
> I've spent a whole day trying to figure this out.
>  Every FAQ I read, between Linux, Postgres, and Oracle,
> just sends me further into confusion, so I ask:
>
> If I have 512MB of memory in my system, excluding swap
> space,
> what values do I want to set for SHMMAX and SHMALL?

That depeneds on your kernel implemetaion and hardware. I found
followings in /usr/include/asm/shmparam.h on my Linux box.

#define _SHM_ID_BITS    7
#define SHM_ID_MASK    ((1<<_SHM_ID_BITS)-1)

#define SHM_IDX_SHIFT    (_SHM_ID_BITS)
#define _SHM_IDX_BITS    15
#define SHM_IDX_MASK    ((1<<_SHM_IDX_BITS)-1)

/*
 * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
 * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
 */

here PAGE_SIZE == 4096. So I guess we cannot have more than 128MB for
the shared memory on this platform if above comment is correct.
--
Tatsuo Ishii

pgsql-general by date:

Previous
From: "Richard Huxton"
Date:
Subject: Re: Re: LIKE and indexes?
Next
From: Tatsuo Ishii
Date:
Subject: RE: How to read/write multibyte to database