:: Re: [DNG] ..chk 'man niceload', wa…
Inizio della pagina
Delete this message
Reply to this message
Autore: Didier Kryn
Data:  
To: dng
Oggetto: Re: [DNG] ..chk 'man niceload', was: Disabling daemon/process swap on Devuan
Le 13/11/2025 à 06:09, Arnt Karlsen a écrit :
> On Thu, 30 Oct 2025 17:11:23 +0100, Didier wrote in message
> <9163eb05-24cc-48a1-8991-6cfddacd8cd0@???>:
>
>> Le 24/10/2025 à 23:08, Arnt Karlsen a écrit :
>>> On Fri, 24 Oct 2025 11:29:21 +1100, wirelessduck--- wrote in message
>>> <A12C7FA7-3765-479D-942C-0D505955E080@???>:
>>>   
>>>>> On 23 Oct 2025, at 01:50, Steve Litt <slitt@???>
>>>>> wrote:
>>>>>
>>>>> Tom via Dng said on Wed, 22 Oct 2025 17:00:50 +1100
>>>>>       
>>>>>> Hi,
>>>>>>
>>>>>> I'm planning to install openbao and in the install guide[1] it
>>>>>> suggests disabling swap for the process.  This appears to be a
>>>>>> simple configuration line in the included systemd unit file but
>>>>>> I'm not sure what the equivalent would be on Devuan?
>>>>> swapoff
>>>>>
>>>>> ???
>>>>>
>>>>> SteveT
>>>>>
>>>>> Steve Litt
>>>>>
>>>>> http://444domains.com
>>>> Thanks Steve. I did look at that but it seems to turn off swap for
>>>> the entire system and not work on individual processes.
>>> ..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.
>>>
>>>   
>>       Tried it with my application "otari":
>>
>> kryn@apcnb98:~$ niceload -N otari
>>
>>   From another xterm:
>>
>> kryn@apcnb98:~$ pgrep otari
>> 4979
>> kryn@apcnb98:~$ grep VmLck /proc/4979/status
>> VmLck:           0 kB
>>
>>       Means 0kB of memory pages locked in RAM.
>>
> ..er, with: "for p in $(pgrep chromium ) ;do grep VmSwap \
> /proc/$p/status |cut -d: -f2-  ;done |cut -d= -f2- |tr -d \
> [:blank:] |tr '\n' '+' |qalc -c -t -f - ", I get 384.72MB
> of swap on a several weeks old chromium session on my
> chimaera laptop.  My daedalus laptop is much more flaky,
> I easily get seeral GB of swap in a few hours running the
> same cpu throttling on the daedalus versions.
>
> ..still well worth using niceload.
>

    As far as I understand, VmSwap reports the number of memory pages
of the process currently swapped to disk, which is always changing,
depending on the overall memory stress of the host, that is depending on
all processes. Even if it was reporting 0, even several times, it
wouldn't mean that it would always report 0.

    I suppose that niceload changes the process priorities for
scheduling and/or memory access, but it does not seem to lock the
process in memory, and I'm curious of how it could: in the man page for
mlockall(), there is no reference to a command allowing to do this on a
running process (except by the process itself, of course).

    However the test I've reported was made on my laptop where swapping
is disabled. I'll redo the test on my desktop which has 8GB RAM and 8GB
swap.

--     Didier