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

Backport gc heuristics for quick test #89

Closed
wants to merge 10 commits into from

Conversation

d-netto
Copy link
Member

@d-netto d-netto commented Oct 4, 2023

PR Description

Backports upstream heuristics for further testing.

Checklist

Requirements for merging:

oscardssmith and others added 3 commits October 4, 2023 14:11
This PR implements GC heuristics based on the amount of pages allocated
instead of live objects like was done before.
The heuristic for new heap target is based on
https://dl.acm.org/doi/10.1145/3563323 (in summary it argues that the
heap target should have square root behaviour).
From my testing this fixes
JuliaLang#49545 and
JuliaLang#49761
If something odd happens during GC (the PC goes to sleep) or a very big
transient the heuristics might make a bad decision. What this PR
implements is if we try to make our target more than double the one we
had before we fallback to a more conservative method. This fixes the new
issue @vtjnash found in JuliaLang#40644
for me.
This was potentially making us getting wrong results.
@github-actions github-actions bot added port-to-v1.10 port-to-v1.12 This change should apply to Julia v1.12 builds labels Oct 4, 2023
@d-netto d-netto force-pushed the dcn-backport-gc-heuristics branch from 12797a5 to 08421e8 Compare October 5, 2023 13:53
Fix unintended change

Move membalancer to an ifdef

Don't use square root logic because there are questions about it as well

Move allocation to ratio to a number more similar to 1.9

Fix MEMBALANCER code

Add GOGC like variable to control GC frequency

Add null check

Add the batch functions
+ adjust the target heap if too much gets freed out of GC
+ add the counted realloc size to the old gen
@d-netto d-netto force-pushed the dcn-backport-gc-heuristics branch from 594a963 to 08d4faf Compare October 6, 2023 13:35
@d-netto d-netto force-pushed the dcn-backport-gc-heuristics branch from 08d4faf to 747007d Compare October 9, 2023 13:05
Copy link

github-actions bot commented Nov 9, 2023

This PR is stale because it has been open 30 days with no activity. Comment or remove stale label, or this PR will be closed in 5 days.

@github-actions github-actions bot added the stale This pull request is inactive label Nov 9, 2023
@github-actions github-actions bot closed this Nov 14, 2023
@d-netto d-netto removed port-to-v1.10 port-to-v1.12 This change should apply to Julia v1.12 builds labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This pull request is inactive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants