Shared memory set problem on DB2

02 July,2011 by Tom Collins

Shared memory set  problem on DB2 . Running DB2 V9.5 Enterprise on Linux  32 bit 8GB Physical memory, and I was getting the following messages:

"Unable to attach 3 segments totalling 679084032 bytes starting at address
0x00000000.  One possible cause may be an improper setting for the
shmmax Linux kernel tuneable."


"Failed to allocate the desired database shared memory set.
Check to make sure the configured DATABASE_MEMORY + overflow
does not exceed the maximum shared memory on the system.
Attempting to start up with only the system buffer pools.
Desired database shared memory set size is (bytes):
The inactive buffer pool should become available at next database
  startup provided that the required memory is available."

The cause of this was the default value of the kernel parameter shmmax on RedHat Linux is usually  low (32Mb, 33554432 bytes).

As a consequence of this, an DB2 instance that needs to allocate one shared memory segment of 320Mb , will actually use 10 Linux segments of 32Mb. This issue causes a DB2 performance problem due to excessive operation system shared memory allocation.

I resolved this by adding the following lines to /etc/sysctl.conf:

#increased SHMMAX to deal with - shared memory allocation error
kernel.shmmax = 4294967295
kernel.shmmni=4096
kernel.shmall = 2097152
kernel.sem=250    256000 32    1024
kernel.msgmax=65536
kernel.msgmnb=65536
#then run sysctl -p

Author: Jack Vamvas(http://www.dba-db2.com)
Author: Rambler(http://www.dba-db2.com)

Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on Shared memory set problem on DB2

Comments are moderated, and will not appear until the author has approved them.


dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright