[systemd-devel] MemoryLimit and MemorySoftLimit

Albert Strasheim fullung at gmail.com
Mon Mar 26 02:06:42 PDT 2012


Hello all

We want to limit the memory a service can use using MemoryLimit= and
MemorySoftLimit= described in systemd.exec.

As I understand it, LimitAS= and LimitRSS= aren't particularly useful.
Linux doesn't even implement LimitRSS?

http://unix.stackexchange.com/questions/32368/how-to-limit-application-memory-usage

Is there a way for an application to detect when it has hit its
MemorySoftLimit=? We would like to log a warning at this point.

Also, is there some standard way for the application to determine if a
MemoryLimit= is configured? We might want to automatically size some
buffers based on this limit.

Thanks in advance.

Regards

Albert


More information about the systemd-devel mailing list