OS Kernel Parameter: swappiness Warning

Recently I was installing the Oracle Grid Infrastructure – 11g2R on a virtual Linux server.  When the install process came to the Perform Prerequisite Checks screen, I received a warning on the OS Kernel Parameter: swappiness.

Warning_Swappiness

The lower text box displayed the following details:

This is a prerequisite condition to test whether the OS kernel parameter "swappiness" is properly set.
Expected Value
 : Current=100; Configured=100
 Actual Value
 : Current=60; Configured=unknown

When I clicked on the “more details” link, a pop-up box gave me similar information as the lower text box.

Warning_Swappiness_DetailsBelow is the text from the “Details” pop-up box:

OS Kernel Parameter: swappiness - This is a prerequisite condition to test whether the OS kernel parameter "swappiness" is properly set.
 Expected Value
 : Current=100; Configured=100
 Actual Value
 : Current=60; Configured=unknown
 Details:
 -
 PRVG-1201 : OS kernel parameter "swappiness" does not have proper value on node "hlpoem01" [Expected = "100" ; Current = "60"; Configured = "unknown"].
- Cause: <null>
- Action: <null>

Resolution (MUST BE DONE AS ROOT):

In a different session window as root or a super user, I update the OS swappiness parameter.  Below is the text I used, which in bold is nice for cutting & pasting.

First, view the current contents of the /proc/sys/vm/swappiness file.

> cat /proc/sys/vm/swappiness

The default linux OS parameter is 60.

To fix the OS until the next server reboot:

> echo 100 > /proc/sys/vm/swappiness

Then to fix the OS settings permanently after the next server reboot:

> echo vm.swappiness=100 >> /etc/sysctl.conf

Then I verified the change so that I could continue installing the Oracle Grid Infrastructure:

> cat /proc/sys/vm/swappiness

Linux_Swappiness_Change

I clicked on the Check Again button.

Warning_Swappiness_CheckAgain

Finally, the warning was gone.

Swappiness_Succeeded

The Wikipedia page on Swappiness has more details on this parameter.

 

Leave a Comment