db2osconf - DB2 Operating System Configuration
The db2osconf is not a
well-known system command. It is used to compare machine kernel parameters with
parameters recommended from IBM. It is installed as part of DB2 fixpack 6 and
is located with other system commands:
# ls -lrt | grep db2osconf
-r-xr-xr-x 1 bin bin 23284 Sep 5 2002 db2osconf
The db2osconf command is sensitive to
Solaris OS level. A 64-bit version of db2osconf will be necessary for a 32-bit
or 64-bit DB2 database version for Solaris.
db2osconf system switches:
-c # Client only
-f # Compare to current
-l # List current
-m <mem in GB> # Specify memory in GB
-n <num CPUs> # Specify number of CPUs
-p <perf level> # Msg Q performance level (0-3)
-s <scale factor> # Scale factor (1-3)
Examples of db2conf usage:
a.) Listing kernel configuration parameters
relevant to DB2:
# db2osconf -l
msgmap = 258
msgmax = 65535
msgmnb = 65535
msgmni = 256
msgssz = 16
msgtql = 1024
msgseg = 32768
semmap = 1026
semmni = 300
semmns = 2048
semmnu = 2048
semmsl = 1000
semopm = 100
semume = 10
semvmx = 32767
semaem = 16384
semusz = 96
shmmax = 1645831782
shmmin = 1
shmmni = 100
shmseg = 16
max_nprocs = 7978
maxuprc = 7973
availrmem = 51738
freemem = 20197
maxmem = 62432
physmem = 63804
max_ncpus = 1
ncpus = 1
ncpus_online = 1
maxusers = 498
Total kernel space for IPC:
0.01MB (shm) + 0.94MB (sem) + 0.54MB (msg) == 1.49MB (total)
b.) Listing recomended kernel parameters for
local machine with 10 GB RAM size:
# db2osconf -m10
memorySize = 10
set msgsys:msginfo_msgmax = 65535
set msgsys:msginfo_msgmnb = 65535
set msgsys:msginfo_msgssz = 32
set msgsys:msginfo_msgseg = 32767
set msgsys:msginfo_msgmap = 1794
set msgsys:msginfo_msgmni = 1792
set msgsys:msginfo_msgtql = 1792
set semsys:seminfo_semmap = 2050
set semsys:seminfo_semmni = 2048
set semsys:seminfo_semmns = 4300
set semsys:seminfo_semmnu = 2048
set semsys:seminfo_semume = 200
set shmsys:shminfo_shmmax = 4294967295
set shmsys:shminfo_shmmni = 2048
set shmsys:shminfo_shmseg = 200
Total kernel space for IPC:
0.23MB (shm) + 1.13MB (sem) + 1.24MB (msg) == 2.61MB (total)
c.) Comparing recomended kernel parameters
for local machine with current kernel parameters:
# db2osconf -f
msgssz = 32 (16)
msgseg = 32767 (32768)
msgtql = 1280 (1024)
msgmni = 1280 (256)
msgmap = 1282 (258)
semmap = 1538 (1026)
semmni = 1536 (300)
semmns = 3226 (2048)
semmnu = 1536 (2048)
semume = 200 (10)
shmmax = 470414131 (1645831782)
shmmni = 1536 (100)
shmseg = 200 (16)
Conclusion
New
DB2 system commands are enhanced with each upgrade. DBAs should regularly check
the installation directory for updates. A full set of system commands are
installed only with high-end enterprise-class databases equivalents DB2 UDB
EEE.
An
experienced DBA might need some extra commands in the diagnostics and tuning
areas, which IBM did not provide so far.
For
example DB2 has no easy way of analysing trace command output and no tool to
tune SQL by rewriting it. Also DB2 does not have a report that tells users
which objects have statistics and when these statistics were generated.
Other than that, DB2
has very sophisticated tools such as the Performance SMART Guide, the
Governor and the Queuing Patroller, all of which are top database tools on the
market.
»
See All Articles by Columnist Marin Komadina