On 24/01/2020 08:18, Andy Burns wrote:
> Jan Panteltje wrote:
>
>> top shows:
>>
>> MiB Mem : 3906.0 total, 71.6 free, 375.9 used, 3458.6
>> buff/cache
>> MiB Swap: 100.0 total, 19.9 free, 80.1 used.
3364.1 avail
>> Mem
>>
>> kernel claims all memory space as cache
>
> You have that backwards.
>
> From your 3906 MB, 375 MB is used, the kernel is keeping 71 MB free for
> immediate needs, that leaves 3458 MB that would be unused, so it
> temporarily gets used for caching, if the 71 MB is used up, the cache
> will be lowered and that memory become available for use ... no point in
> letting memory be unused when they system can benefit from using it as
> cache.
Exactly. Cache memory is essntially mirroring the disk(s). If it gets
full the disk is activated and any writable data written to it. Read
data is simply discarded.
Why the Pi is using swap is another matter entirely.
If it bothers you stop it, or configure a small ramdisk as swap.
--
I would rather have questions that cannot be answered...
...than to have answers that cannot be questioned
Richard Feynman
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|