[systemd-devel] cgroup use case for preventing a system lock up if say a browser exhausts memory
Lennart Poettering
lennart at poettering.net
Mon Nov 19 18:05:29 PST 2012
On Mon, 12.11.12 12:54, Kai Hendry (hendry at iki.fi) wrote:
> Hi there,
>
> I hope this is the right forum for a systemd question, to address a
> particular problem I'm trying to solve.
>
> Problem is I've found Firefox (for example, this probably can be
> extrapolated to any browser) to lock up machines when memory is
> exhausted. Ideally when the browser hits a certain limit (only 5% of
> free RAM left), Firefox is killed and restarted, to solve my
> particular kiosk use case.
> https://github.com/Webconverger/webc/issues/83
It might be a good idea to simply bump the OOM score for firefox, so
that it is always killed first in case of OOM.
You can achieve that by wrapping ffox in shell script that first echos
somthing to /proc/self/oom_score_adj, and then execs the real ffox binary.
For now, systemd can do the same only for system services really.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list