Improvements to documentation of shared memory configuration under
authorNeil Conway
Thu, 10 Feb 2005 05:14:58 +0000 (05:14 +0000)
committerNeil Conway
Thu, 10 Feb 2005 05:14:58 +0000 (05:14 +0000)
FreeBSD. From Mark Kirkwood, editorializing by Neil Conway.

doc/src/sgml/runtime.sgml

index fab4016faa8e41dff689b7d615456a186c57b9f7..94c03bb5496da6e19f851bac269bc862a05667d9 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -4351,9 +4351,55 @@ options "SEMMNS=240"
 
      
       FreeBSD
+      FreeBSDIPC configuration
+      
+       
+        The default settings are only suitable for small installations
+        (for example, default SHMMAX is 32
+        MB). Changes can be made via the sysctl or
+        loader interfaces.  The following
+        parameters can be set using sysctl:
+
+$ systcl -w kern.ipc.shmall=32768
+$ systcl -w kern.ipc.shmmax=134217728
+$ systcl -w kern.ipc.semmap=256
+
+        To have these settings persist over reboots, modify
+        /etc/sysctl.conf.
+       
+
+       
+        The remaining sempahore settings are read-only as far as
+        sysctl is concerned, but can be changed
+        before boot using the loader prompt:
+
+(loader) set kern.ipc.semmni=256
+(loader) set kern.ipc.semmns=512
+(loader) set kern.ipc.semmnu=256
+
+        Similarly these can be saved between reboots in
+        /boot/loader.conf.
+       
+
+       
+        You might also want to configure your kernel to lock shared
+        memory into RAM and prevent it from being paged out to swap.
+        This can be accomplished using the sysctl
+        setting kern.ipc.shm_use_phys.
+       
+
+       
+        FreeBSD versions before 4.0 work like 
+        NetBSD and 
+        OpenBSD (see below), except that the configuration file uses the 
+        keyword "options" instead of "option".
+       
+      
+     
+
+     
       NetBSD
       OpenBSD
-      FreeBSDIPC configuration
       NetBSDIPC configuration
       OpenBSDIPC configuration
       
@@ -4364,25 +4410,23 @@ options "SEMMNS=240"
         the option SHMMAXPGS (in pages). The following
         shows an example of how to set the various parameters:
 
-options         SYSVSHM
-options         SHMMAXPGS=4096
-options         SHMSEG=256
-
-options         SYSVSEM
-options         SEMMNI=256
-options         SEMMNS=512
-options         SEMMNU=256
-options         SEMMAP=256
+option         SYSVSHM
+option         SHMMAXPGS=4096
+option         SHMSEG=256
+
+option         SYSVSEM
+option         SEMMNI=256
+option         SEMMNS=512
+option         SEMMNU=256
+option         SEMMAP=256
 
-        (On NetBSD and 
-        class="osname">OpenBSD the key word is actually
-        option singular.)
        
+
        
         You might also want to configure your kernel to lock shared
         memory into RAM and prevent it from being paged out to swap.
-        Use the sysctl setting
-        kern.ipc.shm_use_phys>.
+        This can be accomplished using the sysctl
+        setting kern.ipc.shm_use_phys>.
        
       
      
@@ -4589,7 +4633,6 @@ set semsys:seminfo_semmsl=32
      
 
     
-