Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That would normally mean you ignore the system getting slower for a long time.


Not a long time. With swap enabled, when a process consumes too much memory your system goes from perfect performance to cursor lagging to everything is frozen and you can't even switch to a TTY within 5-10 seconds.

Without swap, the system lags for a couple seconds, OOM killer frees up memory and you're good to go again. The only slowdown is any pages that were kicked out from the file cache. But those quickly come back after the OOM killer does its thing.


What if the thing you kill is in the critical stack to saving your work? If it isn't I don't really understand why you would be swapping it in a lot

I would view the OOm solution as a compute as cattle thinb, but here we are talking about a user desktop where the user can take the best action for themselves once they realize there's a problem.


> If it isn't I don't really understand why you would be swapping it in a lot.

The user doesn't decide which processes are swapped in. If the process gets CPU time and tries to access its data, that data will get swapped in.

> We are talking about a user desktop where the user can take the best action for themselves once they realize there's a problem.

You can't do that with swap, because once you realize there's a problem, you cannot even move your cursor or run commands to take any actions.


This sounds nothing like the gradual leak problem described.. An OOM killer is great once you actually run out of resources, removing virtual resources to always run out and play roulette is using it as a fad hammer.


You have only about 10sec between the system getting slower and the system locking up completely. If you manage to hit the Magic SysRq key combination to trigger OOM manually, that can save the system, but you have to be quick.

[1] https://en.wikipedia.org/wiki/Magic_SysRq_key




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: