[systemd-devel] Making /run respect Container Memory Limits
Michal Koutný
mkoutny at suse.com
Thu Nov 7 20:19:06 UTC 2024
On Mon, Sep 30, 2024 at 12:17:40PM GMT, Lennart Poettering <lennart at poettering.net> wrote:
> > Does this mean that if something can't afford its working set to be
> > paged out for latency reasons, it _also_ can't afford its own code to be
> > paged out, and therefore should call mlockall() or otherwise explicitly
> > mlock() the code and data it is operating on, rather than expecting that
> > swap be disabled?
>
> Sure, if you want to make sure that your memory is never paged out,
> then mlockal() or something similar is the way to go.
Something (not so) similar can also be:
MemoryLow=$workingset
MemoryMin=$workingset
or
MemorySwapMax=0
> But of course you need ot know what you are doing,
Ditto (this will affect reclaim on the rest of the system and truly
sensitive app should better mark explicitly what's critical with the
mlocks above).
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20241107/7ba66cca/attachment.sig>
More information about the systemd-devel
mailing list