go pprof heap profile vs top mem_usage

2.3k Views Asked by At

I am running go application and use pprof to get heap profile of it as below:

curl -s http://localhost:<port>/debug/pprof/heap > heap_profile.out
go tool pprof heap_profile.out

As a result, I get this: Showing nodes accounting for 507.98MB, 99.41% of 510.98MB total. But I don't know where does it get this 507.98MB in first place. When I check current memory usage using top, it shows that my application is using only 200MB memory (RES value in top command's result). Can somebody explain what is the difference between total in_use memory shown by heap profile and mem_usage given by top ?

0

There are 0 best solutions below