Swappiness, as the name suggests, affects the swapping in the Linux systems.
Introduction
Its kind of slider value. 0 means keep pages in memory as long as possible. 100 means at maximum throttle and in-between just a frequency for swapping.
The minimum value for the swappiness is 0 and the maximum is 100. The default value is 60. On the Oracle Exadata database machine it is also set to default value of 60.
Results
Decreasing the swappiness would keep more pages in memory instead of putting them in swap space, and so those pages would occupy the memory, and in case memory is needed than on run time those pages would be swapped out, causing the overhead, but the plus side is that if those pages are accessed again, they dont have to be swapped in again, as they would already be present in the memory.
If swappiness is increased then it would swap out more aggressively, and if pages are accessed which have been swapped out, the user’s interactivity will get degradation first time.
This is all relative.
For instance, If we are observing memory shortage for the prcoess and there is lot of swapping out (so in vmstat) then we might look at increasing swappiness to swapout more to make room for more memory.
If we are observing more and more swapping in (ver frequent si in vmstat) then we could look at decreasing swappiness.
In order to play with the swappiness, you can temporarily set it by:
echo 100 > /proc/sys/vm/swappiness and you can permanently set it in /etc/sysctl.conf
Managed IT Consulting Services
Are you ready to save up to 60% in operational costs?
On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
How AEG Presents uses data to boost client engagement for Coachella and other events

How AEG Presents uses data to boost client engagement for Coachella and other events
Apr 9, 2019 12:00:00 AM
3
min read
RMAN Recipes: How to Switch Oracle Logs Automatically
RMAN Recipes: How to Switch Oracle Logs Automatically
Feb 27, 2007 12:00:00 AM
1
min read
Speeding-Up Oracle Export/Import Migration
Speeding-Up Oracle Export/Import Migration
Nov 10, 2006 12:00:00 AM
2
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.