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. The operating system shared memory default, for most Linux releases is 32MB. The minimum required by Adaptive Server is 64MB for default Server with 2K pages. A higher value is required if you plan to increase Adaptive Server’s total memory. 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.
  2. 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 Linux releases 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.
  3. To guarantee that the minimum operating shared value is applied every time the system is started, edit the /etc/sysctl.conf file.
  4. On Linux RHEL 5 and greater, Adaptive Server version 15.x running on multiple engines requires the security feature Exec-Shield to be disabled. To disable Exec-Shield:
    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