A while back I raised a discussion (
http://tinyurl.com/4h3qg7 )
regarding SQL1084C Shared memory segments cannot be allocated. We
still have this problem, so I thought I should bump the thread.
Current status:
[db2inst1@wbv7 ~/lelle/scripts]$ uname -a
Linux wbv7 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686
i386 GNU/Linux
[db2inst1@wbv7 ~/lelle/scripts]$ db2level
DB21085I Instance "db2inst1" uses "32" bits and DB2 code release
"SQL09050"
with level identifier "03010107".
Informational tokens are "DB2 v9.5.0.0", "s071001", "LINUXIA3295", and
Fix Pack
"0".
Product is installed at "/opt/IBM/db2/V9.5".
[db2inst1@wbv7 ~/lelle/scripts]$ cat /proc/meminfo
MemTotal: 3895372 kB
[db2inst1@wbv7 ~/lelle/scripts]$ cat /proc/sys/kernel/shmmax
3221225472
Thus, we have 4Gb physical memory, and are allowed to use 3Gb shared
memory.
Last time I ran into this problem I did some monitoring:
[db2inst1@wbv7 ~/lelle/scripts]$ cat determine_db2_memory.sh
#!/bin/sh
echo "Instance memory"
db2mtrk -i -v | grep "Total:"
echo "Database memory"
db2mtrk -d -v | grep "Total:" | awk '{ sum += $2 } END { print "
Total: " sum }'
echo "Agent private memory"
db2mtrk -p -v | grep "Total:" | awk '{ sum += $2 } END { print "
Total: " sum }'
[db2inst1@wbv7 ~/lelle/scripts]$ ./determine_db2_memory.sh
Instance memory
Total: 21364736 bytes
Database memory
Total: 413859840
Agent private memory
Total: 16187392
This sums up to well under 500Mb of memory, which would leave us with
2.5Gb free shared mem. Now this leaves me with a number of questions:
1. Is db2 using shared memory other than that shown by db2mtrk? If so,
how can I determine how much memory it is using?
2. Is db2 unable to use the additional 2.5Gb shared memory?
Any thoughts anyone?