runtime: frequent ReadMemStats will cause heap_live to exceed next_gc #50592
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Maybe, I am not sure, GC Pacer Redesign maybe reduce the probability of it
What operating system and processor architecture are you using (
go env
)?darwin/amd64
What did you do?
A test similar to https://go-review.googlesource.com/c/go/+/227767/3
What did you expect to see?
heap_live <= next_gc
What did you see instead?
probabilistic recurrence
and
While this example is extreme, does this result meet expectations?
There is only one user Goroutine running in the demo,
In this scenario, should the GC pacer mechanism ensure that heap_live <= next_gc ?
some brief analysis:
I guess it is related to this commit https://go-review.googlesource.com/c/go/+/216557 ,
Frequent ReadMemStats/STW causes GC mark goroutine to execute too slowly.
I also found some interesting phenomena in the positioning of this problem (maybe it is normal, but maybe some strategy adjustments can be made if necessary)
The text was updated successfully, but these errors were encountered: