System grinds to a halt when memory runs out

Optimize your system for ultimate performance.

Moderators: khz, MattKingUSA

User avatar
raboof
Established Member
Posts: 1632
Joined: Tue Apr 08, 2008 11:58 am
Location: Deventer, NL
Contact:

System grinds to a halt when memory runs out

Postby raboof » Tue Jul 23, 2019 1:49 pm

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?

User avatar
CrocoDuck
Established Member
Posts: 1049
Joined: Sat May 05, 2012 6:12 pm
Contact:

Re: System grinds to a halt when memory runs out

Postby CrocoDuck » Tue Jul 23, 2019 3:46 pm

raboof wrote:I guess the first step will be to create some test programs to reliably reproduce the problem.


About this, I think the stress command does the job for you. For example, in the past I used this:

Code: Select all

stress --cpu 4 --io 4 --vm 4 --vm-bytes 2048M


What it does is noted down in this review on my blog.
Check my Linux audio experiments on my SoundCloud.
Browse my AUR packages.
Fancying a swim in the pond?

User avatar
AlexTheBassist
Established Member
Posts: 279
Joined: Mon May 19, 2014 3:44 am
Location: Russia, Moscow

Re: System grinds to a halt when memory runs out

Postby AlexTheBassist » Thu Jul 25, 2019 3:47 am

Just change swappiness kernel parameter to something that will fit your workflow. It's not Windows, you actually can do that.
Kde Neon
Warwick RockBass Streamer Standard
Tons of other borrowed instruments
Presonus Eris E4.5
Some musical education
Ardour, EQ10Q, LSP Plugins…


Return to “System Tuning and Configuration”

Who is online

Users browsing this forum: No registered users and 4 guests