Hi, On Wed, Dec 21, 2022 at 4:45 PM Saj Goonatilleke <s...@discourse.org> wrote: > --- 8< --- > # systemctl show docker-container-id.scope | awk -F = '$1 ~ /Memory.*Max/' > MemoryMax=25165824 > MemorySwapMax=infinity > --- >8 --- > > From the cgroup: > > --- 8< --- > # cat memory.swap.max > max > > # cat memory.current memory.swap.current > 22798336 > 218423296 > --- >8 --- > > I would expect memory.swap.max to read zero (swap - limit), > and likewise for memory.swap.current.
I can't reproduce it on unstable, with docker/20.10.21+dfsg1, containerd/1.6.14~ds1, runc/1.1.4+ds1. $ docker run --rm --memory 1G --memory-swap 1G -it ubuntu:18.04 bash root@65cc55e0f5f8:/# $ systemctl show docker-65cc55e0f5f82c23bed45a8451c552650d7eebee182db991ecd855454fafaab7.scope |grep MemorySwapMax= MemorySwapMax=infinity $ cat /sys/fs/cgroup/system.slice/docker-65cc55e0f5f82c23bed45a8451c552650d7eebee182db991ecd855454fafaab7.scope/memory.swap.max 0 The systemd property seems wrong, but the cgroup value is right. So I think it's not a big deal. I'll try to see if I can reproduce it on bullseye later. -- Shengjing Zhu