Swap memory different from what is configured in the container.

Evaristo

Member
Sep 30, 2022
6
1
8
Dears, good morning! Could someone on the forum help me understand why the memory defined in the proxmox interface differs from the memory in the container.
In the proxmox, 16G of memory is defined, example:

root@pve0:~# cat /sys/fs/cgroup/lxc/100/memory.max
118111600640
The container has 8G of memory, example:
[root@ctsrv ~]# free -m
total used free shared buff/cache available
Mem: 112640 40 112531 8 68 112599
Swap: 8191 0 8191
 
Dears, good morning! Could someone on the forum help me understand why the memory defined in the proxmox interface differs from the memory in the container.
In the proxmox, 16G of memory is defined, example:

root@pve0:~# cat /sys/fs/cgroup/lxc/100/memory.max
118111600640
The container has 8G of memory, example:
[root@ctsrv ~]# free -m
total used free shared buff/cache available
Mem: 112640 40 112531 8 68 112599
Swap: 8191 0 8191
 

Attachments

  • 0Xcsxythl0.png
    0Xcsxythl0.png
    4.8 KB · Views: 5
  • CGBNFTgW5P.png
    CGBNFTgW5P.png
    4.8 KB · Views: 5
could you post /proc/meminfo from both container and host?
 
could you post /proc/meminfo from both container and host?
Good morning! Fabian, I managed to understand what was happening, in fact my hypervisor had 8G of swap and I was putting 16G of swap in my container. And the container takes the swap defined on the host and not the one defined in the container.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!