Available memory in Docker container running in Proxmox CT higher than the CT assigned memory

32 Views Asked by At

I created a CT with 32 GB RAM in Proxmox server with 256 GB RAM.

$ free -h
               total        used        free      shared  buff/cache   available
Mem:            32Gi       555Mi       128Mi        27Gi        31Gi        31Gi
Swap:          8.0Gi       597Mi       7.4Gi

In this (Debian) CT I installed Docker and ran PostgreSQL in it, which I fill with data. However, I had a problem with autovacuum which crashed the database after an hour of filling. I went inside the PostgreSQL container and I see that it has the RAM of the whole server and not just the one allocated for the CT!

# free -h
              total        used        free      shared  buff/cache   available
Mem:         251.4G       77.2G       16.9G       27.4G      157.3G      145.1G
Swap:          8.0G        4.4G        3.6G

How is this possible? CT is created as an unprivileged container with nesting=1 flag.

0

There are 0 best solutions below