[systemd-devel] cgroup use case for preventing a system lock up if say a browser exhausts memory

Peter Sztan sztanpet at gmail.com
Tue Nov 13 03:26:28 PST 2012


On Tue, Nov 13, 2012 at 7:53 AM, Kai Hendry <hendry at iki.fi> wrote:
> On 12 November 2012 19:35, Colin Guthrie <gmane at colin.guthr.ie> wrote:
>> When launching firefox becomes a "user unit", then it will be contained
>> within it's own cgroup and can have resource limits imposed with
>> relative ease.
>
> Thanks Colin for your reply.
>
> I'm interested in a general systemd framework example of a system
> process resource limited. Do you have one you can point me to?
>
> What's important for me here, since this can run on machines with
> varying amount of memory that it's basically restarted when it's
> nearing memory exhaustion. Tbh I think the "OOM killer" should just do
> this, but I gather it's more complicated than that.

would a simple OOMScoreAdjust [1] suffice?

http://www.freedesktop.org/software/systemd/man/systemd.exec.html


More information about the systemd-devel mailing list