Make process non-swappable
Dear Linux Users
I have a netbook with Debian Wheezy and KDE installed (but question is not related to distro).
The system hangs up when I launch a program (it's not important exactly which) that consumes much memory. It happens so because all other processes (including KDM) are swapped.
Because I use the netbook in GUI mode I want KDM to be responsive all the time (and I prefer this memory-hungry process to be swapped rather than KDM). It would be great to specify that some processes (e.g. kdm) should not be swapped at all.
The questions are:
1) does this problem annoys anybody except me?
2) maybe there is a common solution (and I could not find suitable keywords to search)
3) is there any possibility of specifying that process must not be swapped at all? Of course such a feature may lead to global out-of-memory if misconfigured (e.g. if too much processes have to always be in RAM).
4) can cgroups help with this?
There are sysctls that control how memory is managed - but you'd need the foresight of the Oracles of Delphi to configure them correctly.
Maybe have a look at your swappiness setting, but cgroups certainly will allow you to control things as you want. See the kernel source tree for the best doco.
|All times are GMT -5. The time now is 07:23 AM.|