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

parallelize sweeping of object pools #51282

Merged
merged 1 commit into from
Sep 22, 2023
Merged

parallelize sweeping of object pools #51282

merged 1 commit into from
Sep 22, 2023

Conversation

d-netto
Copy link
Member

@d-netto d-netto commented Sep 12, 2023

We've backported this PR and ran some benchmarks internally. It seems to be a win for reducing maximum GC pauses for us.

For the binary_tree open-source GCBenchmarks, concurrent page sweeping seems to be a lot more effective, but this PR doesn't seem to hurt performance there compared to master.

It seems to decrease sweep times significantly in the objarray.jl GCBenchmark:

  • master (36 mutator threads, 36 GC threads):
bench = "objarray.jl"
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ total time │ gc time │ mark time │ sweep time │ max GC pause │ time to safepoint │ max heap │ percent gc │
│         │         ms │      ms │        ms │         ms │           ms │                us │       MB │          % │
├─────────┼────────────┼─────────┼───────────┼────────────┼──────────────┼───────────────────┼──────────┼────────────┤
│ minimum │      15899 │    9316 │      2915 │       6401 │         2386 │            308397 │     9305 │         57 │
│  median │      17527 │   10430 │      3336 │       7135 │         2937 │            605870 │     9766 │         59 │
│ maximum │      19342 │   12467 │      4317 │       8149 │         3742 │            679771 │    11402 │         64 │
│   stdev │       1036 │     947 │       426 │        538 │          396 │            153045 │      728 │          2 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
  • PR (36 mutator threads, 36 GC threads):
bench = "objarray.jl"
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ total time │ gc time │ mark time │ sweep time │ max GC pause │ time to safepoint │ max heap │ percent gc │
│         │         ms │      ms │        ms │         ms │           ms │                us │       MB │          % │
├─────────┼────────────┼─────────┼───────────┼────────────┼──────────────┼───────────────────┼──────────┼────────────┤
│ minimum │      13273 │    6318 │      3758 │       2557 │         1631 │            282552 │     8704 │         46 │
│  median │      14326 │    6809 │      4139 │       2702 │         1851 │            664444 │    10061 │         48 │
│ maximum │      14865 │    7065 │      4304 │       2771 │         1982 │            760770 │    11342 │         50 │
│   stdev │        547 │     259 │       180 │         86 │          121 │            134561 │      780 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘

@d-netto d-netto marked this pull request as draft September 12, 2023 14:05
@giordano giordano added performance Must go faster GC Garbage collector labels Sep 12, 2023
@d-netto d-netto force-pushed the dcn-parallel-sweeping branch 3 times, most recently from 168909c to 25ef8d8 Compare September 20, 2023 01:51
@d-netto d-netto marked this pull request as ready for review September 20, 2023 04:25
@d-netto d-netto merged commit a127ab7 into master Sep 22, 2023
5 of 6 checks passed
@d-netto d-netto deleted the dcn-parallel-sweeping branch September 22, 2023 18:48
d-netto added a commit to RelationalAI/julia that referenced this pull request Sep 26, 2023
kpamnany pushed a commit to RelationalAI/julia that referenced this pull request Oct 19, 2023
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Oct 20, 2023
kpamnany pushed a commit to RelationalAI/julia that referenced this pull request Oct 21, 2023
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Oct 23, 2023
d-netto added a commit to RelationalAI/julia that referenced this pull request Oct 30, 2023
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Oct 31, 2023
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Nov 1, 2023
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Nov 1, 2023
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Nov 2, 2023
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Nov 7, 2023
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Nov 10, 2023
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Nov 10, 2023
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Jan 18, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Jan 23, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Jan 24, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Jan 25, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Jan 27, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Jan 30, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Jan 31, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Feb 1, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Feb 6, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Feb 7, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Feb 14, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Feb 21, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Feb 22, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
Drvi pushed a commit to RelationalAI/julia that referenced this pull request Feb 28, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Mar 1, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Mar 13, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
Drvi pushed a commit to RelationalAI/julia that referenced this pull request Apr 3, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
d-netto added a commit to RelationalAI/julia that referenced this pull request Apr 16, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Apr 23, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Apr 24, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Apr 30, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request Apr 30, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request May 2, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request May 9, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request May 19, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request May 26, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request May 28, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
DelveCI pushed a commit to RelationalAI/julia that referenced this pull request May 29, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
Drvi pushed a commit to RelationalAI/julia that referenced this pull request Jun 7, 2024
Sweeping of object pools will either construct a free list through dead objects (if there is at least one live object in a given page) or return the page to the OS (if there are no live objects whatsoever). With this PR, we're basically constructing the free-lists for each GC page in parallel.
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.

3 participants