Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Back in the day I used to curse the OOM-killer for being over-aggressive and killing apps I was using. Now, as I periodically watch my system thrash for 15 minutes because of some ill-behaved program, and then finally resort to a force-power-off because it won't respond to the keyboard, I realize I had it better than I realized back then.

How do I restore the OOM-killer to its old, bloodthirsty ways?

share|improve this question
1  
Take a look at the programs causing an issue, and limit the amount of memory they can suck up with limits.conf –  ultrasawblade May 7 '13 at 1:44
add comment

1 Answer

I would decrease the amount of swap space you have available. Typical installs these days attempt to allocate as much swap as there is physical memory (or sometimes twice as much). The problem with this is that when something goes awry, the system goes into a death-spiral of attempting to "shuffle" things from memory to disk, and back, and it starts doing so much of that it doesn't have time to respond to user input.

In the good-ol-days, entire processes were swapped out to disk (and back), hence large swaps were needed.

In modern virtual memory systems, memory is swapped out in blocks (rather than whole processes), so you can get by with smaller swaps. In your scenario, you'd be better off having processes killed, so running with smaller swap will cause OOM to start killing processes sooner (rather than having the system spend inordinate amounts of time swapping stuff to/from disk).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.