Mailinglist Archive: opensuse-support (91 mails)

< Previous Next >
[opensuse-support] Prevent system unresponsive state on huge memory consumption
  • From: Mykola Krachkovsky <w01dnick@xxxxxxxxx>
  • Date: Wed, 12 Sep 2018 14:41:37 +0300
  • Message-id: <8541139.TBLjkyQPRm@thaumaturge>
Hi,

I've tried to compare two XML (each roughly 3MiB in size) using `xmldiff`. But
this program have eaten whole RAM and swap and ended up in unresponsive system
and then crashed almost everything — X session with all applications — so I've
got just tty's. "Nice".

Is there any way to prevent such behaviour in future? There is ulimit, but I
don't want to limit all of my processes. Nice solution is (IMO) would be to
allow every process to reach some limit after which application would be
stopped (not killed), some notification sent (if possible) and user (me) could
make some decision what to do with it — kill, allow once, add to white list.
If program is white-listed allow it to do anything until ulimit/OOM-killer
behaviour.

Is there any way to do this? I'm not expecting absolutely ready solution, but
at least some direction how I can achieve this. The only solution I'm aware of
and could do — make some daemon that periodically checks process memory usage
and sends SIGSTOP if some of them uses too much, but I'd prefer not use this
approach — there is no perfect time period — high CPU usage vs too late to do
anything.


--
Kind regards,
Mykola Krachkovsky
--
Найкращі побажання,
Микола Крачковський
< Previous Next >
Follow Ups