Troubleshooting
Problem
When kernel parameter setting for vm.swappiness is 0, the swappiness value may affect OOM killer behaviour on certain RHEL versions.
Symptom
Occasionally, you may find Db2 database server process (db2sysc) is killed by the Linux OOM killer.
For example, the following message can be found in OS log /var/log/messages:
Dec 1 01:00:00 host1 kernel: Out of memory: Kill process 12345 (db2sysc) score 157 or sacrifice child
Cause
The swappiness value may affect OOM killer behaviour on certain RHEL versions. Please refer to
Setting vm.swappiness=0 on RHEL 6.4 - 6.7 can cause OOM conditions (https://access.redhat.com/solutions/1149413).
However on RHEL 7, swappiness set to 0 does not prevent swapping entirely in the context of global memory reclaim.
Please refer to this RedHat article for details:
https://access.redhat.com/solutions/3383811
Setting vm.swappiness=0 on RHEL 6.4 - 6.7 can cause OOM conditions (https://access.redhat.com/solutions/1149413).
However on RHEL 7, swappiness set to 0 does not prevent swapping entirely in the context of global memory reclaim.
Please refer to this RedHat article for details:
https://access.redhat.com/solutions/3383811
Resolving The Problem
Note the recommendation for Db2 is to set vm.swappiness to 5, as documented in Knowledge Center:
https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.qb.server.doc/doc/c0057140.html
https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.qb.server.doc/doc/c0057140.html
However, setting vm.swappiness to 0 on RHEL 7 doesn't necessarily mean swapping is prevented.
You may consider to increase physical memory in such case.
Document Location
Worldwide
[{"Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"ARM Category":[{"code":"a8m500000008PmEAAU","label":"Operating System or Hardware->Memory Management"}],"ARM Case Number":"TS004635283","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Version(s)"}]
Was this topic helpful?
Document Information
Modified date:
19 December 2020
UID
ibm16390946