Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / September 2008

Tip: Looking for answers? Try searching our database.

db2 V9.5 SQL1084C

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lennart - 29 Sep 2008 15:06 GMT
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?
Lennart - 29 Sep 2008 17:18 GMT
[...]
> 2. Is db2 unable to use the additional 2.5Gb shared memory?

Judging from dbm cfg it looks as if it is willing to use it:

[db2inst1@wbv7 ~]$ db2 get dbm cfg show detail | grep INSTANCE
Size of instance shared memory (4KB)  (INSTANCE_MEMORY) =
AUTOMATIC(775441)          AUTOMATIC(775441)

/Lennart
Liam Finnie - 29 Sep 2008 21:20 GMT
> [...]
>
[quoted text clipped - 7 lines]
>
> /Lennart

Hi Lennart,

I notice now that you're using 32-bit Linux - didn't realize that in
your previous posts.  That's likely the reason why you could activate
more databases in previous releases - before 9.5, each database had
it's own address space, and agents working for a particular database
only map in the address space for the database they are working on.
With the threaded engine in 9.5, all database address spaces are
contained in a single process address space, which limits how many
databases you can activate.  See the following link for more details:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db
2.luw.qb.migration.doc/doc/c0007192.html


db2mtrk won't show all memory allocated by the server.  For more
accurate counters, you should use either the admin_get_dbp_mem_usage()
table function, or use 'db2pd -dbptnmem'.

Cheers,
Liam.
Lennart - 30 Sep 2008 04:32 GMT
> > [...]
>
[quoted text clipped - 25 lines]
> Cheers,
> Liam.

Thanx a lot Liam, this explain the problems I'm facing.

/Lennart
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.