:: Re: [DNG] ....chk 'man niceload', w…
Top Page
Delete this message
Reply to this message
Author: Didier Kryn
Date:  
To: dng
Subject: Re: [DNG] ....chk 'man niceload', was: Disabling daemon/process swap
Le 24/10/2025 à 23:34, Arnt Karlsen a écrit :
> On Wed, 22 Oct 2025 17:45:02 +0200, Didier wrote in message
> <7f96e87f-77a3-487f-8fc5-144ca46b198e@???>:
>
>> Le 22/10/2025 à 15:44, Didier Kryn a écrit :
>>>      It is possible to disable the current process' swapping
>>> programmatically.
>
> ..from the 'man niceload' 'OPTIONS' section:
>
>    --noswap
>         -N  No swapping. If the system is swapping both in and out
>             it is a good indication that the system is memory stressed.
>
>             --noswap is over limit if the system is swapping both
>                  in and out.
>
>             --noswap will set both --start-noswap and run-noswap.
>
>

    My humble understanding is that this is not a per-process action,
but it acts on the whole system. I'd like to be mistaking, which would
prove one can act on this through /proc<process-id>

    OTOH, I have checked that calling mlockall() does actually lock
memory pages, and also that it does not survive execve() -- as can be
checked with 'grep VmLck /proc/<process-id>/status' . Therefore, my
understanding is that the daemon must either call mlockall() itself or
run inside an environment where swapping is disabled for all processes.

--     Didier