-
Notifications
You must be signed in to change notification settings - Fork 18k
proposal: runtime: add HeapMarked to MemStats #51966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
CC @mknyszek @golang/runtime |
A few thoughts:
More fundamentally, if (3) isn't a problem (and it seems like it would be OK in your use-case to be a little loose), why isn't I'm not fundamentally opposed to something like |
Thanks. For (1), got it, thanks. For (4). We just want to figure out the spikes that are unexpected. We used to enter this case:
Yeah, totally understand. |
Adding to minutes but it seems like a likely decline for next week. |
This proposal has been added to the active column of the proposals project |
Based on the discussion above, this proposal seems like a likely decline. |
No change in consensus, so declined. |
Background:
We want to figure out the reason for memory spikes.
I found this may be a proper way:
Like this case:
HeapMarked
keeps in almost 100MB usually.HeapMarked
grows fast, reaches 150MB, after one GC termination, then, dump a heap profile, eg. a.profile.We could know why heap grows 50MB, by using this command:
This could work since heap profile may be up to two garbage collection cycles old:
go/src/runtime/mprof.go
Line 560 in 8c73f80
We could roughly calculate the
HeapMarked
byNextGC / (1+GCPercent/100)
.I think it would be useful to add HeapMarked to MemStats, so that we can get it exactly.
The text was updated successfully, but these errors were encountered: