Hello!
1) From documentation:
2) Here is my host and some containers mem/swap info. Sirius - is the host. Host has 8Gb swap. Behavior I can't clear understand: if containers memory equal or higher host swap size, then container swap is 8Gb, even If I set different value in containers setting. For example, for zabbix I have 512Mb swap setted.
Q: Does container shows host swap total size anyway and just not use more then in settings ?
3) xfiles container has 0 swap size in settings, but free command shows that container use 795Mb.
Q: Why is it still use swap?
1) From documentation:
Q: As I understand, host swap space is reclaiming to containers depends on their swap setting. Is it right ? If not, where is containers swap come from ?
swap: Allows the container to use additional swap memory from the host swap space. This corresponds to the memory.memsw.limit_in_bytes cgroup setting, which is set to the sum of both value (memory + swap).
2) Here is my host and some containers mem/swap info. Sirius - is the host. Host has 8Gb swap. Behavior I can't clear understand: if containers memory equal or higher host swap size, then container swap is 8Gb, even If I set different value in containers setting. For example, for zabbix I have 512Mb swap setted.
Q: Does container shows host swap total size anyway and just not use more then in settings ?
3) xfiles container has 0 swap size in settings, but free command shows that container use 795Mb.
Q: Why is it still use swap?
Code:
root@sirius:~# free -h
total used free shared buff/cache available
Mem: 62Gi 13Gi 859Mi 9Gi 49Gi 38Gi
Swap: 8.0Gi 5.6Gi 2.4Gi
root@sirius:~# pct enter 102
root@zabbix:~# free -h
total used free shared buff/cache available
Mem: 10G 1.6G 68M 6.8G 8.4G 8.4G
Swap: 8.0G 182M 7.8G
root@zabbix:~# exit
exit
root@sirius:~# pct enter 104
root@xfiles:~# free -h
total used free shared buff/cache available
Mem: 4.0G 1.1G 795M 92M 2.2G 2.9G
Swap: 4.0G 795M 3.2G
root@xfiles:~# exit
exit
root@sirius:~# pct enter 105
root@oscam:~# free -h
total used free shared buffers cached
Mem: 8.0G 84M 7.9G 14M 0B 48M
-/+ buffers/cache: 35M 8.0G
Swap: 8.0G 4.4M 8.0G
root@oscam:~# exit
exit
root@sirius:~#