Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Take a look at the programs causing an issue, and limit the amount of memory they can suck up with limits.conf – LawrenceC May 7 '13 at 1:44

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .