resetting shmmax parameters

Hello,

Code:
FreeBSD O/S 7.2 i386 1CPU AMD

Server memory
RAM memory
	hw.physmem: 1060540416

# sysctl -a | grep shm
   kern.ipc.shm_allow_removed: 0
   kern.ipc.shm_use_phys: 0
   kern.ipc.shmall: 8192
   kern.ipc.shmseg: 128
   kern.ipc.shmmni: 192
   kern.ipc.shmmin: 1
   kern.ipc.shmmax: 33554432

From dmesg
# grep memory /var/run/dmesg.boot
real memory  = 1073676288 (1023 MB)
avail memory = 1036972032 (988 MB)

# swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b       1536000       32  1535968     0%
/dev/ad1s1b       1048576       28  1048548     0%
/dev/ad4s1b       2072576       44  2072532     0%
Total             4657152      104  4657048     0%


program suggested parameters for shared memory

To reset the parameters:
Code:
  vi /etc/sysconfigtab    in order to add the lines
      ipc:
          shm-max=2147483647
          sem-mni=128

What is a safe / comfortable shmmax to use?
Can I increase shmmax on the fly as in Linux or do I have to do reboot?


Thanks!
 
Not sure about the recommend limit, but you should be able to increase it without rebooting.

Usually these are set by adding the parameters into /etc/sysctl.conf.

For example (recommended values for multimedia/totem):
Code:
kern.ipc.shmmax=67108864
kern.ipc.shmall=32768

If your system works fine, then it's probably ok to leave kern.ipc.shmmax alone though.
 
Prior to parameter reset ==>

Code:
mach# sysctl -a | grep shmmax
kern.ipc.shmmax: 33554432
mach#

After resetting parameters ==>

Code:
mach# cat /etc/sysctl.conf
# $FreeBSD: src/etc/sysctl.conf,v 1.8.32.1 2009/04/15 03:14:26 kensmith Exp $
#
#  This file is read when going to multi-user and its contents piped thru
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
#security.bsd.see_other_uids=0
kern.module_path=/boot/kernel;/boot/modules;/usr/local/modules
kernel.shmmax = 1610612736

Reloading

Code:
mach# /etc/rc.d/sysctl reload
mach#

Other attempts
Code:
mach# sysctl -a | grep shmmax
kern.ipc.shmmax: 33554432
mach#
mach#  /etc/rc.d/sysctl restart
mach#
mach# sysctl -a | grep shmmax
kern.ipc.shmmax: 33554432
mach#
mach# /etc/rc.d/sysctl force reload
Usage: /etc/rc.d/sysctl [fast|force|one](start|stop|restart|rcvar|reload|lastload)
mach#
mach# sysctl -a | grep shmmax
kern.ipc.shmmax: 33554432

kern.ipc.shmmax: 33554432 apparently unchanged !!!
Which is the default 32 Mb size

BTW: Apparently physical RAM memory + swap determines capacity for SHMMAX
 
Back
Top