Adjusting the Operating System Shared Memory Parameters

Learn how to adjust shared memory parameters for your platform.

Linux

The default operating system shared memory for most 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 total memory.

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
  • To guarantee that this value is applied every time the system is started, edit the /etc/sysctl.conf file.
On Linux RHEL update 4.0 and higher, Adaptive Server running on multiple engines requires you to disable the Exec-Shield security feature. To disable Exec-Shield:
  1. Add the following lines in /etc/sysctl.conf:
    • On update 4.0:
      kernel.exec-shield=0
      kernel.exec-shield-randomize=0
    • On update 5.0 and higher:
      kernel.exec-shield=0
      kernel.randomize_va_space=0
  2. Enter:
    /sbin/sysctl -P

For additional information, see the Red Hat Web site.

If the server fails to restart after you have adjusted the SHMMAX parameter, you may also need to increase the value of another Kernel parameter, SHMALL, which 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


Created June 23, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com