I sometimes try to run more memory-intensive applications than my system can handle.
Of course, there is no easy way out: some memory-hungry application will have to go. That is what the OOM killer is designed to accomplish.
However, what I notice is that sometimes, my system first grinds to a halt (even moving the mouse barely works, let alone actually switching windows and killing offending processes - this lasts for minutes).
I have already turned off swap (as I prefer killing the offending process over introducing lots of I/O due to swapping). I don't want to disable memory overcommit, as it is a useful approach.
What can I do make sure the OOM killer kicks in before my system becomes unresponsive, and/or 'reserve' some resources to make sure my mouse and xterms remain functional even when the rest of the system is getting overloaded?
I guess to get at the root of the problem, it would be good to first explain what the system is so busy with. Sure, you can expect some slowdown because in low-memory situations there won't be as much room for disk cache and similar optimizations, but that doesn't feel like it explains the whole system becoming unresponsive. I guess the first step will be to create some test programs to reliably reproduce the problem.
Any ideas?
System grinds to a halt when memory runs out
Moderators: MattKingUSA, khz
Re: System grinds to a halt when memory runs out
About this, I think the stress command does the job for you. For example, in the past I used this:raboof wrote:I guess the first step will be to create some test programs to reliably reproduce the problem.
Code: Select all
stress --cpu 4 --io 4 --vm 4 --vm-bytes 2048M
- AlexTheBassist
- Established Member
- Posts: 353
- Joined: Mon May 19, 2014 3:44 am
- Location: Russia, Moscow
- Been thanked: 1 time
Re: System grinds to a halt when memory runs out
Just change swappiness kernel parameter to something that will fit your workflow. It's not Windows, you actually can do that.
Being creative does not imply being lazy, stupid, or illiterate.
Working in Harrison Mixbus and Ardour on KDE Neon + KXStudio.
Working in Harrison Mixbus and Ardour on KDE Neon + KXStudio.