-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: garbage collection slower from go1.2 to tip #7956
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
Labels
Milestone
Comments
2x of this is probably just https://code.google.com/p/go/source/detail?r=234b65f69439 So runtime.GC() got slower (which now does two GCs), but not garbage collection itself that much. Actual GC probably got a bit slower due to precise GC, but not as bad as this bug report makes it look. Also, I thought (but can't recall exactly which CL) that Go 1.3 is better at using multiple CPUs during GC, but this test might be constraining it to 1. |
I've modified the program as: http://play.golang.org/p/X6ktVBSxp9 And here is gc trace: START gc17(1): 1+0+118292+0 us, 3982 -> 7965 MB, 1490930 (2490954-1000024) objects, 663379/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields gc18(1): 1+0+117926+0 us, 3983 -> 7967 MB, 1490930 (2494938-1004008) objects, 667363/1/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields END gc19(1): 1+0+118287+0 us, 3983 -> 6016 MB, 1488981 (2496973-1007992) objects, 667365/0/0 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields gc20(1): 1+134044+118120+0 us, 3982 -> 3982 MB, 1486945 (2496973-1010028) objects, 667365/0/665413 sweeps, 0(0) handoff, 0(0) steal, 0/0/0 yields gc time: 372.813836ms So while runtime.GC time is 372ms, actual GC pause when triggered normally is 118ms, which is slightly better than 1.2. However, the pause in 1.3 does not include sweeping, so it seems that total GC time is still somewhat worser than in 1.2. I've looked at the profile, and I do not see anything pathological there, or anything we can easily fix for 1.3: 65.40% gc gc [.] runtime.memclr 8.77% gc gc [.] markonly 8.37% gc gc [.] runtime.MSpan_Sweep 2.47% gc gc [.] scanblock 2.10% gc gc [.] runtime.memmove 2.05% gc gc [.] strings.Repeat 1.27% gc [kernel.kallsyms] [k] clear_page_c 1.23% gc gc [.] runtime.sweepone 1.03% gc gc [.] runtime.updatememstats 0.75% gc gc [.] markroot We know that we need to improve GC, and there are plans to do some work for 1.4. I do not see anything actionable for 1.3, so marking this as #WontFix. Status changed to WontFix. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: