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 |
| sem |
250 32000 32 128 |
250 256000 32 1024 |
SEMMSL: max # of sems per id SEMMNS: max # of sems system wide SEMOPM: max # of ops / semop call SEMMNI: max # of sem ids |
| msgmni |
16 |
1024 |
max # of msg queues system wide |
| msgmax |
8192 |
65536 |
max size of a single msg in bytes |
| msgmnb |
16384 |
65536 |
max size of a msg queue in bytes |
| kernel
parameter |
default
value |
recommended value |
usage |
|
| 32 bits |
64 bits |
|||
| sem |
250 32000 32 128 |
250 256000 32 1024 |
SEMMSL: max # of sems per id SEMMNS: max # of sems system wide SEMOPM: max # of ops / semop call SEMMNI: max # of sem ids |
|
| msgmni |
16 |
1024 |
max # of msg queues system wide |
|
| shmmax |
0x2000000 |
0x10000000 (2^28) |
0x40000000 (2^36) |
max size of a shm segment in bytes |
| kernel
parameter |
default
value |
recommended
value |
usage |
| sem |
250 32000 32 128 |
250 256000 32 1024 |
SEMMSL: max # of sems per id SEMMNS: max # of sems system wide SEMOPM: max # of ops / semop call SEMMNI: max # of sem ids |
| msgmni |
16 |
1024 |
max # of msg queues system wide |
| shmmax |
0x2000000 |
0xFFFFFFFF (2^32 - 1) |
max size of a shm segment in bytes |
| shmall |
0x200000 |
amount of memory in bytes (8 GB) |
max # of shm segment pages system wide |
| kernel
parameter |
default
value |
recommended value |
usage |
|
| 32 bits |
64 bits |
|||
| sem |
250 32000 32 128 |
250 256000 32 1024 |
SEMMSL: max # of sems per id SEMMNS: max # of sems system wide SEMOPM: max # of ops / semop call SEMMNI: max # of sem ids |
|
| msgmni |
16 |
1024 |
max # of msg queues system wide |
|
| shmmax |
0x2000000 |
0x100000000 (2^32) |
amount of memory in bytes |
max size of a shm segment in bytes |
| shmall |
0x200000 |
amount of memory in bytes |
amount of memory in bytes |
max # of shm segment pages system wide |
| kernel
parameter |
default
value |
recommended
value |
usage |
| sem |
250 32000 32 128 |
250 256000 32 1024 |
SEMMSL: max # of sems per id SEMMNS: max # of sems system wide SEMOPM: max # of ops / semop call SEMMNI: max # of sem ids |
| msgmni |
16 |
1024 |
max # of msg queues system wide |
| shmmax |
0x2000000 |
0x10000000 (2^28) |
max size of a shm segment in bytes |
| mapped_base for the db2agent process |
|
|
Base address for shared libraries (specific to some ditros, like RH) |
| Physical
RAM |
shmmax
value |
|
| > |
<= |
|
| 256 MB |
512 MB |
<= 0x010000000 (256 MB) |
| 512 MB |
1 GB |
<= 0x020000000 (512 MB) |
| 1 GB |
2 GB |
<= 0x040000000 (1 GB) |
| 2 GB |
4 GB |
<= 0x080000000 (2 GB) |
| 4 GB |
<= 0x100000000 (4 GB) |
|
| Physical
RAM |
shmmax
value |
|
| > |
<= |
|
| 4 GB |
8 GB |
0x0100000000 (4 GB) |
| 8 GB |
16 GB |
0x0200000000 (8 GB) |
| 16 GB |
32 GB |
0x0400000000 (16 GB) |
| 32 GB |
64 GB |
0x0800000000 (32 GB) |
| 64 GB |
128 GB |
0x1000000000 (64 GB) |
| etc, |
||