Hello,
I'm running Unifi OS Server in a VM and trying to keep the RAM footprint small since this is a 16 GIB PVE node. Unifi OS Server seems to be configured to reserve as much free RAM as it can get away with as buffer/cache, so with 2 GiB of RAM given to the VM, I end up with this sort of RAM usage:

This seems to be plenty--Unifi OS is a very fancy web server running inside Podman inside a VM--but I don't love the 100-500 MiB I see in swap.
If this were a bare metal system, I don't think I'd care. I've (finally) learned that by default, swap is used by the system even when it's not out of RAM.
But my VMs are stored on a ZFS mirror using (very nice) prosumer NVMEs, so I'd rather avoid unnecessary virtual disk I/O when I can.
Since it's not actually running out of RAM, I'm considering setting swappiness == 1 (that is, only swap to avoid running out of RAM). A couple of questions.
I'm running Unifi OS Server in a VM and trying to keep the RAM footprint small since this is a 16 GIB PVE node. Unifi OS Server seems to be configured to reserve as much free RAM as it can get away with as buffer/cache, so with 2 GiB of RAM given to the VM, I end up with this sort of RAM usage:

This seems to be plenty--Unifi OS is a very fancy web server running inside Podman inside a VM--but I don't love the 100-500 MiB I see in swap.
If this were a bare metal system, I don't think I'd care. I've (finally) learned that by default, swap is used by the system even when it's not out of RAM.
But my VMs are stored on a ZFS mirror using (very nice) prosumer NVMEs, so I'd rather avoid unnecessary virtual disk I/O when I can.
Since it's not actually running out of RAM, I'm considering setting swappiness == 1 (that is, only swap to avoid running out of RAM). A couple of questions.
- Is there a good reason not to do this on a low RAM VM?
- If I do set swappiness to 1, what would b some symptoms that I've made the VM unhappy?