[Proxmox 8.1] Host Swap vs. LXC Swap?

Sep 1, 2022
507
192
53
41
Hello,

My Proxmox host doesn't have any swap. I don't think it's enabled at all. It says N/A in the GUI and free seems to indicate that it's disabled.

Code:
# free
               total        used        free      shared  buff/cache   available
Mem:        65678608     7681536    58305356       54712      362180    57997072
Swap:              0           0           0

I didn't do this; it installed that way. I've not paid much attention to it, and when I created an LXC, I gave it zero swap, because the host has zero swap and my understanding was that LXCs/CTs share the host swap, so it didn't make sense to give it access to swap that didn't exist.

Did I misunderstand something? Should my LXCs have swap?
1700866381353.png
 
No, you did understand it correctly.


This is up to you to decide.

I found this thread, I think this will answer your questions:
https://forum.proxmox.com/threads/how-is-swap-handled-by-lxc.26756/
Thanks!

I'll check that thread out.
For now, it sounds like I'm fine leaving it set as zero, since my system isn't configured to use swap at all. (I assume this is due to the amount of RAM I have in the system, as I was never asked whether or not I wanted to turn it on during the setup.)