Allocating Sufficient Shared Memory

McIDAS-X uses shared memory for frame allocation. On HP-UX systems, the shared memory facility is activated by default and has a sufficient maximum segment size for most McIDAS-X sessions. However, this is not true for Solaris, Linux and Mac OS X systems. The system administrator must force the kernel to activate the shared memory system at boot time and set the maximum segment size to 512 MB or greater the first time McIDAS-X is installed on a Solaris, Linux or Mac OS X workstation.

The McIDAS Users' Group uses the following settings on Solaris, Linux, and Mac OS X.

Solaris
The system administrator must complete the steps below the first time McIDAS-X is installed on a Sun workstation running Solaris.

1. Force the kernel to activate the shared memory system at boot time by adding the line below to the appropriate location in the file /etc/system.
forceload: sys/shmsys

2. Check the maximum size of a shared memory segment using the command below. The value is indicated in bytes; the example lists a 512 MB maximum shared memory segment.

Type:  /usr/sbin/sysdef | grep SHMMAX

536870912 max shared memory segment size (SHMMAX)

If your value is less than 512 MB, go to step 3. If your value is 512 MB or greater, go to step 4.

3. Set the shared memory size to 512 MB by adding the line below to the appropriate location in the file /etc/system.

set shmsys:shminfo_shmmax = 536870912

4. Reboot the system so the forceload entry and 512 MB maximum shared memory size take effect.

Red Hat Enterprise Linux
The system administrator must complete the steps below the first time McIDAS-X is installed on a Red Hat Enterprise Linux workstation.
  1. Edit the file /etc/sysctl.conf.
  2. Set the shared memory size to 512 MB by adding the two lines listed below to the end of the file.

    kernel.shmmax = 536870912
    kernel.shmall = 536870912
  3. Run the following command from the Unix prompt.

    Type:  /sbin/sysctl -p

Every time the machine reboots, the shared memory will be set to the value set above.

Mac OS X
As user 'root', create the file /etc/sysctl.conf and add the following lines:

kern.sysv.shmmax=536870912
kern.sysv.shmmin=1
kern.sysv.shmmni=128
kern.sysv.shmseg=32
kern.sysv.shmall=131072
Note the relationship between shmall and shmmax. shmall is the number of pages (4k in size). shmall*4096=shmmax.
This allows the full 512 MB of shared memory to be addressed.

After making these changes, the system will need to be rebooted for the changes to take effect.


Updated June 2012