@ZEAL Blog·厉
We stand alone,


Posted by zeal on 2006-07-28 15:25 , 692 characters |  + 1 - 0   English
标签 ( 开发/理论 ):  , 

On Linux, the default shared memory limit (both SHMMAX and SHMALL) is 32 MB in 2.2 kernels, but it can be changed in the proc file system (without reboot). For example, to allow 128 MB run these commands:

$ echo 134217728 >/proc/sys/kernel/shmall
$ echo 134217728 >/proc/sys/kernel/shmmax

These commands could also be put into a script to run at boot-time.

Alternatively, sysctl can be used, if available, to control these parameters. Look for a file called /etc/sysctl.conf and add the following lines to it:

kernel.shmall = 134217728
kernel.shmmax = 134217728

The sysctl.conf file is usually processed at system boot-up, but sysctl can also be called explicitly.

Last Modified on 2007-05-28 14:18
Since 2005.04.27  梦想 就像鸡蛋 要么孵化 要么臭掉RSS Feed (Entries) | Back To Home | @ZEAL | 沪ICP备05024379号