-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Put off major collections to improve GC times. #44215
Conversation
This helps with JuliaLang#40644 and other programs which suffer from non-productive full collections.
…uent full collections.
src/gc-debug.c
Outdated
@@ -977,6 +977,15 @@ void gc_time_sweep_pause(uint64_t gc_end_t, int64_t actual_allocd, | |||
jl_ns2ms(gc_postmark_end - gc_premark_end), | |||
sweep_full ? "full" : "quick", -gc_num.allocd / 1024); | |||
} | |||
|
|||
void gc_time_summary(int sweep_full, uint64_t start, uint64_t end, uint64_t freed, uint64_t live, uint64_t interval, uint64_t pause){ | |||
if (sweep_full > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4 space indent
@nanosoldier |
Something went wrong when running your job:
Unfortunately, the logs could not be uploaded. |
Looks like noise https://github.com/JuliaCI/NanosoldierReports/blob/master/benchmark/by_hash/75f4f26_vs_7889b2a/report.md. Note that we have very few gc-benchmarks, other than the test harness itself (which is not measured). |
Maybe we should add the example from #40644 ? |
Put off full GC unless absolutely necessary. This fixes some egregious behavior as in #40644 but uses more memory.
Before:
1.635486 seconds (100.00 k allocations: 863.182 MiB, 73.03% gc time)
1.318420 seconds (100.00 k allocations: 863.182 MiB, 74.84% gc time)
1.075697 seconds (100.00 k allocations: 863.182 MiB, 65.05% gc time)
1.474924 seconds (100.00 k allocations: 863.182 MiB, 73.06% gc time)
1.100034 seconds (100.00 k allocations: 863.182 MiB, 66.54% gc time)
1.362786 seconds (100.00 k allocations: 863.182 MiB, 79.13% gc time)
1.417983 seconds (100.00 k allocations: 863.182 MiB, 74.69% gc time)
1.046719 seconds (100.00 k allocations: 863.182 MiB, 65.62% gc time)
1.347786 seconds (100.00 k allocations: 863.182 MiB, 78.98% gc time)
1.004516 seconds (100.00 k allocations: 863.182 MiB, 68.80% gc time)
After: 1.447965 seconds (100.00 k allocations: 863.182 MiB, 63.36% gc time)
0.544911 seconds (100.00 k allocations: 863.182 MiB, 2.97% gc time)
0.531376 seconds (100.00 k allocations: 863.182 MiB)
0.387158 seconds (100.00 k allocations: 863.182 MiB, 6.38% gc time)
0.441621 seconds (100.00 k allocations: 863.182 MiB, 16.72% gc time)
0.504395 seconds (100.00 k allocations: 863.182 MiB)
0.472456 seconds (100.00 k allocations: 863.182 MiB)
0.660828 seconds (100.00 k allocations: 863.182 MiB, 53.38% gc time)
0.289179 seconds (100.00 k allocations: 863.182 MiB)
0.350453 seconds (100.00 k allocations: 863.182 MiB, 17.39% gc time)