Re: shared memory settings: SHMMAX and SHMALL

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: gbittar(at)iqa(dot)cc
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: shared memory settings: SHMMAX and SHMALL
Date: 2001-03-15 12:15:32
Message-ID: 20010315211532B.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tatsuo Ishii 2001-03-15 12:15:52 RE: How to read/write multibyte to database
Previous Message Richard Huxton 2001-03-15 10:09:50 Re: Re: LIKE and indexes?