Sometimes I work with huge dumps of data I want to keep in memory for processing. Sometimes I miscalculate the amount of memory my program will produce, or a debugger multiplies the memory usage by a factor that exceeds my available memory.
Whenever I start a memory-hungry process, this is what I'd expect from a sane operating system: try to eat all free memory, then ask some other non-essential processes nicely to give up some memory they don't need, then write to swap.
Here's what Ubuntu does for me: eat all fre memory, then ask the operating system to swap all essential services (gnome session, terminal, keyboard), then freeze and wait for me to pull the power plug.
Two questions:
- How can an operating system assume, that anything could be so important that it is ok to stop listening to user input?
- How can I tell Ubuntu to never swap essential services and always react to user input, even if some stupid process tries to eat up more resources than the system provides.
swapon
to find out)? Cheers, Alswappiness
setting to 10, ie:vm.swappiness = 10
in /etc/sysctl.conf. Search here for swappiness for more info about it. 2) If swappiness doesn't help... Even though you may not want to... increase the size of your swapfile to 1.5x16G and see if that helps. Keep me posted. Cheers, Alvm.swappiness=10
needs to be ADDED to sysctl.conf. An experienced person could even use the sysctl command on the fly, to set vm.swappiness=10, without editing the sysctl.conf file. Cheers, Al ps: waiting for the OP to respond.