SMA and LLA Guide : Creating and running SMA applications : Creating SMA applications - overview : Modifying shared memory kernel parameters: Overview
  
Modifying shared memory kernel parameters: Overview
Shared memory is allocated in segments. The shared memory system parameters control the maximum size and number of segments allowed on your system.
Typically solidDB® uses 32 MB segment sizes.
The shared memory parameters and their management mechanisms depend on the system. In Linux and UNIX environments, you may need to address the type of kernel parameters described below.
Important: This section and the sections below discuss only the requirements set by solidDB®. Other processes running on the same system may require higher limit values.
Maximum size of a shared memory segment
Typically you do not need to modify the default system setting. This is because the solidDB® segment size of 32 MB is considerably small.
Maximum number of shared memory segments in a system/process
– Because solidDB® allocates most of the segments in 32 MB, you may need more segments than allowed by your system by default, especially if you have a large database.
The maximum number of shared memory segments must be at least the solidDB® process size in MB divided by 32.
For example, for a process size of 1 GB (1024 MB), at least 32 segments are needed.
– Set the maximum number of segments to a clearly higher value than required by your database size. A higher value has no side effects.
– solidDB® uses only one process; if your environment requires you to set the maximum number of segments for a process and for the system separately, you can use the same value for both.
Maximum total size of all shared memory segments
The total combined size of all shared memory segments depends on the size of your database and availability of disk space.
Note In addition to this kernel parameter, the maximum total size of shared memory used by solidDB® is controlled with the solidDB® parameter MaxSharedMemorySize (in the [SharedMemoryAccess] section of the solid.ini file) as follows:
– The value set with the MaxSharedMemorySize parameter takes precedence over the value set with the kernel parameter. Thus, the value set with the MaxSharedMemorySize parameter must never be higher than the value set with the kernel parameter.
– By default, solidDB® is set to use the maximum size of the physical memory of the computer (MaxSharedMemorySize=0). Thus, the default value set with the kernel parameter may be too low.
Example 1
If the system has 2 GB of memory and MaxSharedMemorySize is set to 0, solidDB® uses maximum of 2 GB of memory. If the kernel parameter for maximum total size of all shared memory segments is then set to 1 GB, solidDB® runs out of memory when the 1 GB is reached.
Example 2
If the system has 2 GB of memory and MaxSharedMemorySize is set to 500M, solidDB® never uses more than 500 MB of memory. As long as the kernel parameter for maximum total size of all shared memory segments is set to 500 MB or higher, solidDB® never runs out of memory. It is recommended to set the value to a higher value than the memory required by solidDB®.
Shared memory kernel parameters for SMA on AIX
On AIX systems, the shared memory kernel parameters do not need to be modified. The upper limits are defined for the AIX IPC mechanisms, which are not configurable. The shared memory limits are allocated and deallocated dynamically as needed, so that the memory requirements always depend on the current system usage.
Important: Do not set the page space allocation policy to early page space allocation. Instead, use the deferred (default) or late space allocation policy.
See also
Creating SMA applications - overview