Maybe but 10GB of RAM is much more useful than almost any amount of swap. If you are worried about the red line, then just set vm.swappiness to 0 to only swap when out of memory. I don't understand what possible problem more swap and therefore less memory will help solving instead of making worse. If Plex needs more memory, give it more memory instead of fake memory in the form of swap space.
The problem that I am observing in regards to this, is the interaction (and memory, thus swap management) between PVE vs. Linux VMs.
In the Proxmox web UI, for my Ubuntu VM that's hosting the Plex Media Server docker container, I gave it 32 GiB of RAM, and the web UI reports that 30.67 GiB of that is used (95.84%).
But if I log into the Ubuntu VM, according to
top
, it shows that out of the 31.358 GiB total RAM, only 1.135 GiB is used, and the rest is cached.
This is why the Proxmox web UI thinks that the Ubuntu VM is a "memory hog" because Linux uses available RAM as cache.
And that, in turn, causes Proxmox to think that it needs swap.
But if I run
sudo docker stats
, it shows that the Plex Media Server container, right now, is only using about 8.41 GiB out of a 31.36 GiB limit.
Thus, in neither case, is the Ubuntu VM nor the Plex Media Server docker container, remotely close to running out of RAM.
But Proxmox, because of how Proxmox (Debian 11) <--> Ubuntu (VM) interacts with each other -- makes Proxmox thinks that it needs swap.
Thank you.
Yeah, I ran that as well.
Before I accidentally rebooted the system yesterday, where it was showing the high swap usage, using
smem -akt
, I was able to show that that VM was using about 3.4 GiB of swap.
Thank you.