With help from Nelson Mimura Gonzalez and Bryan S Rosenburg I was able to 
make some progress on the relationship between the cgroups view and the 
procfs view.

In the cgroups view: `memory.usage_in_bytes` is the sum of 
`memory.stat:rss` + `memory.stat:cache` + `memory.stat:mapped_file` + 
`memory.kmem.usabe_in_bytes`.

The cgroups `memory.stat:rss` is one page less than the sum of these procfs 
values: (sum of Rss of anonymous pmap blocks) + (sum of Anonymous of fd 
pmap blocks).

Regards,
Mike
On Tuesday, August 18, 2020 at 1:56:30 AM UTC-4 [email protected] wrote:

> I collected data on an example program from four angles.  See 
> https://docs.google.com/document/d/1KUz7IjnD93X2VTVkRAhhNa7rHScCaIH8GLrsoaDIW_g
>  
> for the raw data and my puny attempts to correlate the four views.  There 
> are some exact equalities, some near matches, some gross differences in 
> things that seem like they should be the same, and things I wasn't able to 
> match in any way.  This begs lots of questions.
>
> Why is memory.usage_in_bytes from cgroups so much smaller than the other 
> top-line measurements?  What is statm.size counting that the coredump "all" 
> is not?
>
> I assume that the text part of the connection-agent binary is shared.  Why 
> is the readonly data part of the connection-agent binary _not_ shared?
>
> What is statm.data counting that MemStats.Sys is not?
>
> Why is MemStats.HeapIdle so much bigger than the coredump's heap free 
> spans?
> Why is MemStats.heapReleased so much bigger than the coredump's heap 
> released?
> In MemStats, (HeapIdle - HeapReleased) = 1,490,944
> In coredump, (heap free spans) - (heap released) = 1,613,824 --- not so 
> very different.  What is making the roughly 52 MB difference between 
> MemStats and the coredump?
>
> Why is the bss in the coredump so huge?  Does it correspond to anything in 
> any of the other views?
>
> What do the three big anonymous blocks in the procfs view correpond to in 
> the other views?
>
> Thanks,
> Mike
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/1be31756-b836-4449-b56a-dd8f9b1fdae8n%40googlegroups.com.

Reply via email to