Control: tag -1 unreproducible moreinfo

On Mon, Jan 2, 2023 at 3:17 AM Shengjing Zhu <z...@debian.org> wrote:
>
> 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.
>

Can't reproduce it on bullseye as well.

debian@cloudimg:~$ sudo docker run --rm -itd --memory 1G --memory-swap
1G debian bash
5ccda9e406f85546afd5ccc61cf277cf0ed8f50ec80472d2641ae26d0c13d21e

debian@cloudimg:~$ systemctl show
docker-5ccda9e406f85546afd5ccc61cf277cf0ed8f50ec80472d2641ae26d0c13d21e.scope
|grep MemorySw
MemorySwapMax=infinity

debian@cloudimg:~$ cat
/sys/fs/cgroup/system.slice/docker-5ccda9e406f85546afd5ccc61cf277cf0ed8f50ec80472d2641ae26d0c13d21e.scope/memory.swap.max
0
debian@cloudimg:~$ cat
/sys/fs/cgroup/system.slice/docker-5ccda9e406f85546afd5ccc61cf277cf0ed8f50ec80472d2641ae26d0c13d21e.scope/memory.max
1073741824

$ sudo docker version
Client:
 Version:           20.10.5+dfsg1
 API version:       1.41
 Go version:        go1.15.15
 Git commit:        55c4c88
 Built:             Mon May 30 18:34:49 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.5+dfsg1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.15.15
  Git commit:       363e9a8
  Built:            Mon May 30 18:34:49 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.13~ds1
  GitCommit:        1.4.13~ds1-1~deb11u3
 runc:
  Version:          1.0.0~rc93+ds1
  GitCommit:        1.0.0~rc93+ds1-5+deb11u2
 docker-init:
  Version:          0.19.0
  GitCommit:

debian@cloudimg:~$ uname -a
Linux cloudimg 5.10.0-18-cloud-amd64 #1 SMP Debian 5.10.140-1
(2022-09-02) x86_64 GNU/Linux

-- 
Shengjing Zhu

Reply via email to