SMA and LLA Guide : Creating and running SMA applications : Creating SMA applications - overview : Modifying shared memory kernel parameters for SMA on HP‑UX
  
Modifying shared memory kernel parameters for SMA on HP‑UX
The default values for shared memory kernel parameters on HP-UX may not be sufficient for running a SMA application. The kernel parameter values can be changed dynamically using the kctune command.
Before you begin
You must have root authority to modify shared memory kernel parameters.
About this task
The following steps show how to set shared memory kernel parameters on HP-UX. The minimum values that are shown according to the requirements set by solidDB®. Other processes running on the same system may require higher limit values.
In HP-UX environments, you may need to modify the following shared memory kernel parameters:
shmmni — Maximum number of shared memory segments on the system
shmseg — Maximum number of shared memory segments attached to a process
shmmax — Maximum size of a single shared memory segment (bytes)
Procedure
1 View the shared memory kernel parameters to determine if there are any necessary changes required for your system.
View the shmmni parameter:
kctune -v shmmni
Tunable             shmmni
Description         Maximum number of shared memory
                    segments on the system
Module              vm_asi
Current Value       400 [Default]
Value at Next Boot  400 [Default]
Value at Last Boot  400
Default Value       400
Constraints         shmmni >= 3
                    shmmni <= 32768
                    shmmni >= shmseg
Can Change          Immediately or at Next Boot
View the shmseg parameter:
kctune -v shmseg
Tunable             shmseg
Description         Maximum number of shared memory segments
                    attached to a process
Module              vm_asi
Current Value       300 [Default]
Value at Next Boot  300 [Default]
Value at Last Boot  300
Default Value       300
Constraints         shmseg >= 1
                    shmseg <= shmmni
Can Change          Immediately or at Next Boot
View the shmmax parameter:
kctune -v shmmax
Tunable             shmmax
Description         Maximum size of a shared memory segment
                    (bytes)
Module              vm_asi
Current Value       1073741824 [Default]
Value at Next Boot  1073741824 [Default]
Value at Last Boot  1073741824
Default Value       1073741824
Constraints         shmmax >= 2048
                    shmmax <= 4398046511104
Can Change          Immediately or at Next Boot
Minimum requirements of shared memory kernel parameters for SMA (HP-UX)
Parameter
Description
When to modify
Notes
shmmni
Maximum number of shared memory segments on the 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 clearly higher value than required by your database size; a higher value has no side effects.
shmseg
Maximum number of shared memory segments attached to a process
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.
Because solidDB® uses only 1 process, the value of shmmni and shmseg can be the same.
shmmax
Maximum size of a single shared memory segment (bytes)
If the value is smaller than 32768 KB (32 MB)
Setting this parameter to a higher value has no side effects.
2 To modify the parameters, use the kctune command. For example, to set the maximum number of shared memory segments to 1024, use the following command:
kctune shmmni=1024
The parameter value change becomes effective immediately and stays effective after reboot.
What to do next
If you modified the shared memory parameters after getting an out of memory error, you may need to clear hanging shared memory segments with the ipcrm command. For more details, see Troubleshooting SMA.
See also
Creating SMA applications - overview