I created a container, in which I've created ~10 processes. I want to analyze how much memory they're consuming. To achieve that, I ran top
inside the container, and docker stats
outside.
In top
, I see 10 processes, each taking 50MB of resident memory. So I would expect docker stats
to show at least 500MB memory used by the container, but it shows only 140 MB.
Where does this discrepancy come from? What is the real memory consumption?