> 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