Skip to content
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

Merged
merged 10 commits into from
Mar 9, 2022

Conversation

chflood
Copy link
Member

@chflood chflood commented Feb 16, 2022

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)

@oscardssmith oscardssmith added GC Garbage collector performance Must go faster labels Feb 16, 2022
@chflood chflood changed the title chf-heuristics Put off major collections to improve GC times. Feb 16, 2022
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)
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 space indent

@JeffBezanson
Copy link
Sponsor Member

@nanosoldier runbenchmarks(ALL, vs=":master")

@nanosoldier
Copy link
Collaborator

Something went wrong when running your job:

NanosoldierError: error when preparing/pushing to report repo: failed process: Process(setenv(`git push`; dir="/nanosoldier/workdir/NanosoldierReports"), ProcessExited(1)) [1]

Unfortunately, the logs could not be uploaded.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Feb 17, 2022

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).

@oxinabox
Copy link
Contributor

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 ?

src/gc.c Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GC Garbage collector performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants