go - Why 'Total MB' in golang heap profile is less than 'RES' in top? -
i have service written in go takes 6-7g memory @ runtime (res in top). used pprof tool trying figure out problem is.
go tool pprof --pdf http://<service>/debug/pprof/heap > heap_prof.pdf
but there 1-2g memory in result ('total mb' in pdf). where's rest ?
and i've tried profile service gogc=off, result 'total mb' same 'res' in top. seems memory gced haven't been return kernel won't profiled.
any idea?
p.s, i've tested in both 1.0.3 , 1.1rc3.
this because go not give memory of gc-ed objects operating system, precise, objects smaller predefined limit (32kb). instead memory cached speed future allocations go:malloc. also, seems going fixed in future todo.
Comments
Post a Comment