The Phoenix wrote:
We are running DB2 8.2 (FP9) on Linux (64bit) with 64 bit instances and
we are reviewing the new features that we could activate on the 2.6
kernel. We came up accross an interesting db2set parameter
DB2_LARGE_PAGE_MEM, but we don't exactly understand how it needs to be
set.
Is this parameter replacing the SHMMAX in Linux? If not, how exactly
are we supposed to relate that to the bufferpool size (currently set to
320000 pages)?
Thanks,
Yvan
Hi Yvan,
You need to be careful when playing with this parameter. Normally, the
OS uses default 4K memory pages - using 16MB large pages for the DB2
database shared memory set (which includes the bufferpools, locklist,
package cache, etc) may help performance, but it means that you have to
carefully provision your system ahead of time, configure how many large
pages the OS should allow, etc. It also means that if you ever want to
dynamically alter your bufferpool sizes, increase your locklist size or
utility heap size, etc., then you will likely have to also reconfigure
and reboot your OS.
With that being said, to have the database shared memory set allocated
using large pages, run:
db2set DB2_LARGE_PAGE_MEM=DB
To ensure that you have enough large pages configured on your system,
before setting this registry variable, you should activate your
database, and find out how large your database shared memory set
currently is:
db2 get db cfg show detail | grep DATABASE_MEMORY
You'll see an in-memory value which represents how big the database
shared memory set is (this should be much easier than calculating by
hand how big all the bufferpools are, the locklist size, package cache
size, etc). Multiple this by 4096 to get the number of bytes - you'll
have to configure the OS to have at least that amount of memory
dedicated to the large page pool. Changing the large page pool will
likely require you to reboot. After the reboot, set the
DB2_LARGE_PAGE_MEM registry variable as mentioned above, and activate
your database.
Cheers,
Liam.