Configuring swappiness in Linux hosting DB2 database server
Swappiness determines how quickly processes are moved from RAM to hard disk to free memory. It can assume the value 0 - 100. A low value means that your Linux™ system swaps out processes rarely while a high value means that processes are written to disk immediately. Swapping out runtime processes should be avoided on the DB2® server on Linux™, so it is advisable to set the swappiness kernel parameter to a low value or zero.
Procedure
- Log in to the Linux™ system as root.
- Set the swappiness parameter to a low value or 0.
- Option A:
- Open the file /etc/sysctl.conf in a text
editor and enter the vm.swappiness parameter
of your choice.Example:
vm.swappiness = 0
- Restart the operating system to load the changes.
- Open the file /etc/sysctl.conf in a text
editor and enter the vm.swappiness parameter
of your choice.
- Option B: To change the value without restarting the operating system, run the following command: sysctl -w vm.swappiness=0.
- Option A: