Question & Answer
Question
The utility, db2osconf, makes recommendations for kernel parameter values based on the size of a system. Solaris kernel parameters should be configured using projmod for DB2 installations on Solaris.
Cause
The utility, db2osconf can be run from the global zone only on Solaris SPARC and Solaris x86-64.
Answer
On Solaris, use db2osconf to obtain recommended values for kernel parameters:
Example output is below:
db2osconf -m 6 -n 2
memorySize = 6
maxCPUs = 2
- set msgsys:msginfo_msgmni = 6144
set semsys:seminfo_semmni = 7168
set shmsys:shminfo_shmmax = 9578697523
set shmsys:shminfo_shmmni = 7168
Total kernel space for IPC:
0.98MB (shm) + 1.71MB (sem) + 2.08MB (msg) == 4.77MB (total)
projadd -c 'DB2 resources' -U db2inst1 user.db2inst1
Use projmod to set the limits for shared memory, semaphore ids, and total shared memory, in accordance with the values generated by db2osconf.
For example (using values generated by db2osconf):
- projmod -s -K "project.max-shm-memory=(privileged,9578697523,deny)" user.db2inst1
projmod -s -K "project.max-msg-ids=(privileged,6144,deny)" user.db2inst1
projmod -s -K "project.max-shm-ids=(privileged,7168,deny)" user.db2inst1
projmod -s -K "project.max-sem-ids=(privileged,7168,deny)" user.db2inst1
The values of these limits should be set in accordance with available system resources. For more information see "Memory management" and related concepts in the DB2 v9.1 Information Center:
To check the project has been created use:
projects -l
user.db2inst1
projid : 100
comment: "DB2 resources"
users : db2inst1
groups : (none)
attribs: project.max-msg-ids=(privileged,6144,deny)
project.max-shm-ids=(privileged,7168,deny)
project.max-sem-ids=(privileged,7168,deny)
project.max-shm-memory=(privileged,9578697523,deny)
Change db2inst1's default project to user.db2inst1 instead of the "default" project so it will pick up the new changes.
usermod -K project=user.db2inst1 db2inst1
Stop the DB2 instance, logout as db2inst1, log back in and start the DB2 instance. No reboot or restart of the Solaris zone is required.
When re-running db2osconf with the "-f" parameter, the recommended values should match the current (old) values.
db2osconf -f -m 6 -n 2
memorySize = 6
maxCPUs = 2
msgmni = 6144 (old: 6144)
semmni = 7168 (old: 7168)
shmmni = 7168 (old: 7168)
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21252553