Well, if you decrease the life time of an idle process, it will be destroyed soon... si, the OS will not swap it (because it was not used for a while...).
I was researching about how kernel controls memory... I think that the other part of the solution is to change the swap behavior of the operative system.
http://lwn.net/Articles/83588/ (google for more articles, there are lots of web with info about this)
To change to a "try to not swap until strictly necessary" (wait until distress value get really high)
echo 0 > /proc/sys/vm/swappiness
If you want to make this changes persistent at every reboot, add this:
echo "vm/swappiness=0" >> /etc/sysctl.conf
You can play with value between 0 and 100 with swappines (60 default, you MUST decrease it right now... ). In any way, you are changing HOW and WHEN the kernell will swap, you are NOT disabling swaping. 0-10 is recommended for production servers.
Another thing, is ALWAYS recommenden that swap space be separated of your user file space.
Regards
Edit: just a correction in some words... sorry for my poor english xD
Recent comments
1 day 7 hours ago
1 day 10 hours ago
1 day 11 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 16 hours ago
1 day 17 hours ago
2 days 9 hours ago
2 days 10 hours ago
2 days 14 hours ago