06-29-2024, 07:47 AM
(06-28-2024, 04:19 PM)TheOldPresbyope Wrote: Swapping to uSD card is certainly faster than swapping to a hard drive so maybe a drag on moOde performance won't be noticed when swapping is enabled.
However, as an FYI, the default swappiness value in Raspberry Pi OS Lite---hence in a moOde installation--- is 60 which is rather aggressive given LInux's greedy swapping algorithm (e.g., more memory pages get swapped out during normal operation than is necessary just to avoid an OOM fault).
You can query the current swappiness value with the following command
Code:sysctl vm.swappiness
I'd suggest cutting the value back to 10 (considered a typical workstation setting) or even 1 (a typical server setting).
This can be done by editing (as superuser) /etc/sysctl.conf to add a new last line vm.swappiness=10, say. and rebooting.
AsI said, perhaps the high value won't matter for moOde but since even on the low-memory Pis we seem to have issues only when indexing large libraries swapping is rarely needed. In the old days our Unix workstations would routinely slow to a crawl when swapping CAD processes to SCSI drives.
Just my 2-cents worth.
Regards,
Kent
It does feel as if there is something else in play here, and optimisations elsewhere might make enabling the swap file redundant. What those optimisations might be however could be tricky. The thread I linked to on the Raspberry Pi Forum seems to indicate that even a standard Pi OS doing an upgrade can run out of memory and need more swap, but conversely we have only one data point to show a moode installation that needs it.
More data on that front, a vanilla moode 9 with only NFS configured and everything else left default will scan my collection to completion with the default 100M swap. My "full fat" configuration (Rotary Encoder, GPIO Buttons, Radio station monitor, CamillaDSP Loudness Volume, Spotify, UPnP, Bluetooth) managed to fill even that. I tried again with 256M and all was well, free tells me the swap got to 107M.
Dare I suggest the swap file should be (yet another) option?
----------------
Robert
Robert