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

From Matthew Rice
Subject Re: shared memory settings: SHMMAX and SHMALL
Date
Msg-id lv8zm7w5vm.fsf@sol.starnix.com
Whole thread Raw
In response to shared memory settings: SHMMAX and SHMALL  (Gregory Bittar <gbittar@iqa.cc>)
List pgsql-general
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> > 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.
>
> 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.

You can recompile the kernel with the new defaults or just change them on
a live system (kernel 2.2.x or higher) with something like:

   echo 419430400 >/proc/sys/kernel/shmall
   echo 419430400 >/proc/sys/kernel/shmmax

You pick the numbers, of course.
--
matthew rice <matt@starnix.com>                               starnix inc.
tollfree: 1-87-pro-linux                        thornhill, ontario, canada
http://www.starnix.com              professional linux services & products

pgsql-general by date:

Previous
From: "Russell Hires"
Date:
Subject: Re: Re: Prompt question
Next
From: Christopher Sawtell
Date:
Subject: Minor disaster after upgrading with cvs.