Closed dumbFeng closed 1 year ago
As https://github.com/golang/go/issues/54223#issuecomment-1204487665 said, heap profiles are only updated when the gc runs. Actually, it's a go heap profile related issue, not a holmes related issue. For more details, please see: https://mosn.io/blog/posts/mosn-holmes-design/#%E6%A0%B9%E6%8D%AEgc%E5%91%A8%E6%9C%9F%E9%87%87%E9%9B%86 https://uncledou.site/2022/go-pprof-heap/
Hope this could help you.
@doujiang24 Nice! Thank you.
But I think they are two different situations. About the one I proposed, I think holmes should dump after next gc runs while the heap peak occurs. In the following processes, the heap profiles are stale and cann't help us find out what incurs the problem:
You should see both the inuse and alloc space together to help locating the root cause
A big heap object will cause rss spike, if it is not used any more later, it will not appear on the inuse object pprof list, but you can find it in the alloc object list
All objects allocated after app started will be counted in the alloc objects/space
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Haven't tried.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I wrote a piece of code:
Then I curled the api to trigger the code to run.
What did you expect to see?
What did you see instead?
So, it seems like that the samples pprof dumps in time are wrong.
For more discussion, Please see golang issue #54233