Adjusting the Operating System Shared Memory Parameters

Adjust shared memory segments if Adaptive Server cannot obtain large memory as a single segment, or if Backup Server stripes fail due to insufficient segments.

Depending on the number and types of devices used for backup (dump) and recovery (load), you may need to adjust the shared memory segment parameter in the operating system configuration file to accommodate concurrent Backup Server processes. There are six default shared memory segments available for process attachments.

If any reconfiguration through sp_configure requires additional memory, Adaptive Server allocates shared memory segments after start-up. To account for these additional segments, allocate the maximum memory available to Adaptive Server by using the allocate max shared memory configuration parameter. See the System Administration Guide.

  1. Use the sysctl(8) method to check and adjust the operating system shared memory parameter.
    • To check the current shared memory size, enter:
      # /sbin/sysctl kernel.shmmax
    • To adjust the shared memory size at runtime, enter the following, where nnn is 1073741824 for 1GB of shared memory:
      # /sbin/sysctl -w kernel.shmmax=nnn
    Note: The default operating system shared memory for some older versions of Linux is 32MB. The minimum required by Adaptive Server is 64MB for a default server with 2K pages. A higher value is required if you plan to increase the Adaptive Server max memory.
  2. To guarantee that this value is applied every time the system is started, edit the /etc/sysctl.conf file.
  3. On Linux RHEL 5 and greater, Adaptive Server version 15.x running on multiple engines requires that you disable the Exec-Shield security feature:
    1. Add the following lines in /etc/sysctl.conf:
      kernel.exec-shield=0
      kernel.randomize_va_space=0
    2. As super user (root), for the action to take effect, enter:
      /sbin/sysctl -P
  4. Set the stack size to unlimited to avoid shared memory attachment problems. Set this using ulimit -s unlimitedon Bourne Shell, or limit stacksize unlimited on C Shell.
  5. If the server fails to restart after you have adjusted the schmmax parameter, you may also need to increase the value of schmall, another Kernel parameter that is the maximum amount of shared memory that can be allocated. You can modify its value in the /etc/sysctl.conf file.
    The syntax for increasing shmall is:
    # /sbin/sysctl -w kernel.shmall=nnn