solidDB Help : Programming : Deploying SMA and LLA applications : Deploying SMA applications : Configuring your environment for SMA use : Modifying shared memory kernel parameters: Overview : Modifying shared memory kernel parameters for SMA on Solaris
  
Modifying shared memory kernel parameters for SMA on Solaris
The default values for shared memory kernel parameters on Solaris 10 might not be sufficient for running a Shared Memory Access (SMA) application. In Solaris 10, the shared memory kernel parameter values can be changed dynamically with the Solaris resource control facilities.
You must have root authority to modify shared memory parameters.
In Solaris environments, you might need to modify the following shared memory parameters:
max-shm-ids: Maximum number of shared memory segments on a system.
max-shm-memory: Maximum size of all shared memory segments on a system (MB).
To update kernel parameters on Solaris 10 to match the shared memory requirements that are set by solidDB, complete the following steps.
Note If you have other processes that run on the same system, you might require higher limit values.
In the following steps, the operating system default project is used.
1 View the shared memory parameters to determine if there are any necessary changes required for your system.
View the project.max-shm-ids parameter:
prctl -n project.max-shm-ids -i project default
project: 3: default
NAME   PRIVILEGE     VALUE   FLAG  ACTION       RECIPIENT
project.max-shm-ids
        privileged     128      -  deny         -
        system       16.8M    max  deny         -
View the project.max-shm-memory parameter:
prctl -n project.max-shm-memory -i project default
project: 3: default
NAME   PRIVILEGE     VALUE   FLAG  ACTION       RECIPIENT
project.max-shm-memory
        privileged  62.7GB      -  deny         -
        system      16.0EB    max  deny
2 Analyze the output to determine if there are any necessary changes required for your system by using the following guidance:
 
Parameter
Description
When to modify
Notes
max-shm-ids
Maximum number of shared memory segments on a system
If the value is smaller than the solidDB process size (MB) divided by 32.
For example, for a process size of 1 GB (1024 MB), at least 32 segments are needed.
Set this parameter to a significantly higher value than required by your database size; a higher value has no side effects.
max-shm-memory
Maximum size of all shared memory segments on a system
If one of the following conditions is true:
SharedMemoryAccess.MaxSharedMemorySize=0 and the memory size that is set with max-shm-memory is smaller than the maximum size of the physical memory in your computer.
The memory size set with max-shm-memory is smaller than the memory size that is set with the parameter SharedMemoryAccess.MaxSharedMemorySize.
Setting this parameter to a higher value has no side effects.
The value that is set with the SharedMemoryAccess.MaxSharedMemorySize parameter takes precedence over the value that is set with the kernel parameter. Thus, the value that is set with the SharedMemoryAccess.MaxSharedMemorySize parameter must never be higher than the value that is set with the kernel parameter.
By default, solidDB is set to use the maximum size of the physical memory of the computer (SharedMemoryAccess.MaxSharedMemorySize=0). Thus, the default value that is set with the kernel parameter might be too low.
3 To modify the parameters, use the prctl command.
For example, to set the maximum number of shared memory segments to 1024, use the following command:
prctl -n project.max-shm-ids -r -v 1024 -i project default
4 Make the changes effective after every reboot.
/usr/sbin/projmod -sK "project.max-shm-ids=(privileged,1024,deny)" default
If you modified the shared memory parameters after getting an out of memory error, you might need to clear hanging shared memory segments with the ipcrm command. For more details, see Troubleshooting SMA.
Go up to
Modifying shared memory kernel parameters: Overview