Ask questionsdocker stats reports wrong memory limit

Container has memory limit set to 64mb, but docker stats reports full system memory. Happens for all my containers, metrics on memory usage are not very helpful now.

web165 ~ # docker inspect -f '{{ .Config.Memory  }}' collectd-mesos-tasks-web165
web165 ~ # docker stats collectd-mesos-tasks-web165 | head -n2
CONTAINER                     CPU %               MEM USAGE/LIMIT     MEM %               NET I/O
collectd-mesos-tasks-web165   0.00%               4.93 MiB/7.79 GiB   0.06%               12.77 MiB/2.472 MiB
Client version: 1.6.0
Client API version: 1.18
Go version (client): go1.3.3
Git commit (client): 4749651
OS/Arch (client): linux/amd64
dServer version: 1.6.0
Server API version: 1.18
Go version (server): go1.3.3
Git commit (server): 4749651
OS/Arch (server): linux/amd64
web165 ~ # docker info
Containers: 13
Images: 136
Storage Driver: devicemapper
 Pool Name: docker-9:127-9961543-pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: extfs
 Data file:
 Metadata file:
 Data Space Used: 6.908 GB
 Data Space Total: 107.4 GB
 Data Space Available: 100.5 GB
 Metadata Space Used: 9.72 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.138 GB
 Udev Sync Supported: false
 Library Version: 1.02.88 (2014-08-05)
Execution Driver: native-0.2
Kernel Version: 3.14.18-gentoo
Operating System: Gentoo/Linux
CPUs: 8
Total Memory: 7.79 GiB
Name: web165

cc @crosbymichael


Answer questions KouLouYiMaSi

image I use k8s start a pod limit memory 80G, but I use docker stats I see 74.51G. my docker version is 18.06.1-ce.


Related questions

Swarm restarts all containers hot 2
can not successfully install docker-ce on ubuntu 16.04 ? why ,Can you help me? hot 1
OCI runtime exec failed: exec failed: cannot exec a container that has stopped: unknown hot 1
Allow COPY command's --chown to be dynamically populated via ENV or ARG hot 1
windowsRS1 and windowsRS5-process are failing due to "Unable to delete '\gopath\src\\docker\docker" hot 1
Panic: runtime error: invalid memory address or nil pointer dereference hot 1
Error response from daemon: rpc error: code = DeadlineExceeded desc = context deadline exceeded hot 1
one container in the overlay network not available hot 1
Containers on overlay network cannot reach other containers hot 1
[Windows] windowsfilter folder impossible to delete hot 1
swarm node lost leader status hot 1
New-SmbGlobalMapping don't continued working in Container hot 1
failed to export image: failed to create image: failed to get layer: layer does not exist hot 1
"docker stack deploy">"rpc error: code = 3 desc = name must be valid as a DNS name component" hot 1
runc regression - EPERM running containers from selinux hot 1
Github User Rank List