Skip to main content


Database server - DB2 recommendations

developerWorks

DB2 recommendations for kernel parameters
DB2 parameters
Further documentation


DB2 recommendations for kernel parameters

When a Linux system should be used as a database server, some of the Linux kernel parameters have to be changed. DB2 recommends to set the kernel parameters to the following values for the versions v8.1 and v8.2:

Kernel parameter

Default value

Recommended value

Usage

----------------

----------------

------------------

-----------------------------

kernel.sem

250 32000 32 128

250 256000 32 1024

semaphore settings

kernel.msgmni

16

1024

max. queues system wide

kernel.msgmax

8192

65536

max. size of messages (bytes)

kernel.msgmnb

16384

65536

default size of queue (bytes)

Back to top


DB2 parameters

  • To establish a basic DB2 database parameter configuration set, you can use the DB2 autoconfigure command. This command calculates and displays values for the buffer pool size, database configuration and database manager configuration parameters. The values can be immediately applied or just displayed. Based on this setup, you can start with the fine tuning of the database setup.

    Example of a DB2 autoconfigure command:

    db2 autoconfigure using mem_percent 90 workload_type simple num_stmts 200 Tpm 6000
    num_local_apps 40 num_remote_apps 40 isolation rr apply none
  • Fine tuning of the database base setup is usually done by changing the database configuration (db) parameters. Some db parameters useful for tuning are:

         LOGPRIMARY/
         LOGFILSIZ      - High transaction rates for OLTP workloads require a larger log buffer.
         CHNGPGS_THRESH - For databases with a heavy update transaction workload, you can generally ensure that
                          that there are enough clean pages in the buffer pool by setting the parameter value equal
                          or less than the default value.
         DBHEAP         - Database heap per database. Needs to be increased for larger buffer pools.
         LOCKLIST       - The amount of storage that is allocated to the lock list. If lock escalations (warnings in
                          the db2diag.log file) are causing performance concerns you may need to increase the value.
         NUM_IOCLEANERS - For example very large buffer pools require a higher number of asynchronous page cleaners.
  • Alternate page cleaning algorithm - DB2 UDB ESE v8.2 introduces a new buffer pool page cleaning algorithm, which is not turned on by default. You might want to test the new page algorithm for your database workload. The alternate page cleaning algorithm can be turned on with the following command:

    db2set DB2_USE_ALTERNATE_PAGE_CLEANING=YES
  • The chart below is an example for tuning a database system running an OLTP workload with a high number of update transactions and randomized read requests. The throughput rate is nearly doubled by some basic adaptions.

    Database tuning for OLTP workload


Back to top



Further documentation

Quick Beginnings for DB2 Servers



Back to top



Team
Please address any comments to the performance team: linux390@de.ibm.com