I created a container in which I created about 10 processes. I want to analyze how much memory they consume. To achieve this, I ran
top inside the container, and
docker stats on the outside.
top, I see 10 processes, each taking 50 MB of resident Memory. So I would wait
docker stats to display at least 500 MB of memory used by the container, but only 140 MB.
Where does this gap come from? What is the actual memory consumption?
output of docker statistics: