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

optimize remset marking #52476

Merged
merged 1 commit into from
Mar 8, 2024
Merged

optimize remset marking #52476

merged 1 commit into from
Mar 8, 2024

Conversation

d-netto
Copy link
Member

@d-netto d-netto commented Dec 10, 2023

Tag the lowest bit of a pointer to indicate it's in the remset and enqueue objects in the remset for later processing when GC threads have woken up, instead of sequentially marking them all at once.

In principle, this should allow for more parallelism in the mark phase, though I didn't benchmark it yet.

@d-netto d-netto added the GC Garbage collector label Dec 10, 2023
@gbaraldi
Copy link
Member

I wonder if we can do something like this for the chunks, because currently only one thread can take pieces of a chunk at a time, and ideally we should be able to fully split the chunk up so that everyone can work on it at once

@d-netto
Copy link
Member Author

d-netto commented Dec 30, 2023

Sorry about the delay.

Not sure if I can see how to use this pointer tagging for chunks? Could you elaborate?

@d-netto
Copy link
Member Author

d-netto commented Dec 30, 2023

This seems like a clear improvement in GC time for the objarray.jl benchmark. For the other ones seems mostly neutral given the noise margins (may possibly be a very small regression):

  • master:
category = "bigarrays"
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 │       8110 │    4741 │      3692 │       1049 │          700 │             57163 │     9714 │         58 │
│  median │       8770 │    5396 │      4211 │       1425 │          866 │             87897 │    10721 │         62 │
│ maximum │       9450 │    6070 │      4366 │       1704 │         1325 │             99379 │    11008 │         64 │
│   stdev │        520 │     512 │       285 │        260 │          237 │             17252 │      519 │          2 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "binary_tree"
bench = "tree_immutable.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 │       2400 │    1446 │       584 │        836 │           37 │              4549 │      403 │         60 │
│  median │       2420 │    1455 │       608 │        849 │           39 │              4671 │      411 │         60 │
│ maximum │       2422 │    1476 │       617 │        889 │           41 │              4936 │      423 │         61 │
│   stdev │         10 │      13 │        12 │         22 │            2 │               167 │        7 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "tree_mutable.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 │       4170 │    2723 │       880 │       1797 │           54 │              5885 │      670 │         65 │
│  median │       4193 │    2731 │       910 │       1838 │           56 │              6065 │      693 │         65 │
│ maximum │       4289 │    2795 │       928 │       1915 │           58 │              6252 │      699 │         66 │
│   stdev │         48 │      29 │        22 │         47 │            2 │               144 │       14 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
  • PR:
category = "bigarrays"
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 │       7985 │    4627 │      3175 │       1341 │          818 │             49892 │     9930 │         58 │
│  median │       8038 │    4732 │      3333 │       1467 │          869 │             57467 │    10446 │         59 │
│ maximum │       8209 │    4890 │      3396 │       1500 │          901 │             79560 │    10871 │         60 │
│   stdev │         94 │     106 │        99 │         65 │           34 │             12129 │      390 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "binary_tree"
bench = "tree_immutable.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 │       2402 │    1442 │       609 │        812 │           37 │              4634 │      383 │         60 │
│  median │       2420 │    1476 │       643 │        832 │           40 │              4820 │      411 │         61 │
│ maximum │       2468 │    1509 │       661 │        868 │           43 │              5043 │      433 │         61 │
│   stdev │         26 │      24 │        20 │         21 │            2 │               189 │       21 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "tree_mutable.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 │       4227 │    2806 │       966 │       1810 │           57 │              5535 │      669 │         65 │
│  median │       4329 │    2848 │       996 │       1865 │           60 │              5945 │      688 │         66 │
│ maximum │       4435 │    2923 │      1058 │       1879 │           62 │              6274 │      702 │         66 │
│   stdev │         77 │      44 │        39 │         28 │            2 │               288 │       12 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘

@gbaraldi
Copy link
Member

gbaraldi commented Jan 2, 2024

I guess it wouldn't be pointer tagging for the chunks, it would probably need to be a heap allocated object, or at least something that's reachable by all threads, but this change lgtm.

@d-netto d-netto force-pushed the dcn-optimize-remset-marking branch from 44c1316 to 734b913 Compare January 4, 2024 16:44
@KristofferC
Copy link
Member

Good to go since the benchmarks seemed to look good? @d-netto

@d-netto
Copy link
Member Author

d-netto commented Feb 16, 2024

Sorry about the delay. Have been OOO these days and not checking GH notifications very frequently.

We didn't assess the performance impact of this change at RAI yet, so I'd prefer to hold this PR for now.

@d-netto d-netto force-pushed the dcn-optimize-remset-marking branch from 734b913 to 3e91c69 Compare March 8, 2024 17:12
@d-netto
Copy link
Member Author

d-netto commented Mar 8, 2024

Have benchmarked it with the new extended suite from GCBenchmarks. Seems like a win for the multithreaded benchmarks.

master
category = "big_arrays"
bench = "issue-52937.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       9139 │    1262 │       371 │        890 │           23 │            248803 │      160 │         14 │
│  median │       9392 │    1461 │       416 │       1043 │           27 │            281220 │      162 │         16 │
│ maximum │       9775 │    1590 │       460 │       1144 │           29 │            334491 │      167 │         16 │
│   stdev │        137 │      62 │        18 │         52 │            2 │             22038 │        1 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "objarray.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │      16334 │    8036 │      6373 │       1600 │         1203 │            192878 │     8602 │         49 │
│  median │      16932 │    8974 │      6913 │       1863 │         1448 │            495146 │    10150 │         53 │
│ maximum │      18634 │   10058 │      7556 │       3041 │         2422 │            708138 │    11824 │         55 │
│   stdev │        541 │     613 │       359 │        386 │          304 │            128839 │      696 │          2 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "binary_tree"
bench = "tree_immutable.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       4773 │    2507 │      1114 │       1189 │           64 │              4843 │      340 │         50 │
│  median │       5272 │    2810 │      1292 │       1533 │           72 │             57820 │      363 │         53 │
│ maximum │       5427 │    3044 │      1463 │       1592 │           93 │            338988 │      395 │         57 │
│   stdev │        149 │     125 │        78 │         86 │            6 │             91983 │       15 │          2 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "tree_mutable.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       8672 │    5200 │      2184 │       2890 │           84 │              5041 │      492 │         57 │
│  median │       9100 │    5525 │      2471 │       3062 │          110 │             61738 │      632 │         61 │
│ maximum │       9451 │    5737 │      2641 │       3109 │          153 │            340845 │      700 │         63 │
│   stdev │        182 │     124 │        99 │         42 │           21 │            111820 │       36 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "mergesort_parallel"
bench = "mergesort_parallel.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       3845 │    1199 │       975 │        218 │          172 │              1340 │     1364 │         30 │
│  median │       4889 │    1704 │      1452 │        239 │          355 │              1503 │     2058 │         35 │
│ maximum │       5455 │    1907 │      1640 │        270 │          420 │              1777 │     2218 │         36 │
│   stdev │        463 │     203 │       195 │         15 │           84 │               126 │      256 │          2 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "mm_divide_and_conquer"
bench = "mm_divide_and_conquer.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       1424 │     147 │        88 │         58 │           23 │            206502 │     1948 │          6 │
│  median │       1711 │     159 │        98 │         61 │           28 │            248779 │     2592 │          9 │
│ maximum │       8291 │     512 │       395 │        117 │          121 │            687372 │     2714 │         11 │
│   stdev │       1342 │      71 │        60 │         12 │           22 │             92000 │      158 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
PR
category = "big_arrays"
bench = "issue-52937.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       8992 │    1336 │       358 │        968 │           23 │            249158 │      160 │         15 │
│  median │       9227 │    1418 │       409 │       1012 │           24 │            279227 │      162 │         15 │
│ maximum │       9595 │    1530 │       451 │       1123 │           28 │            391718 │      166 │         16 │
│   stdev │        148 │      50 │        20 │         45 │            1 │             40352 │        2 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "objarray.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │      14115 │    5900 │      4238 │       1662 │          894 │            198651 │     9785 │         42 │
│  median │      15280 │    7573 │      4932 │       2571 │         1709 │            540755 │    10788 │         49 │
│ maximum │      17109 │    8568 │      5363 │       3245 │         2456 │            735197 │    11849 │         51 │
│   stdev │        760 │     769 │       296 │        518 │          545 │            120039 │      541 │          3 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "binary_tree"
bench = "tree_immutable.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       4991 │    2753 │      1198 │       1543 │           65 │              4484 │      325 │         52 │
│  median │       5237 │    2865 │      1287 │       1581 │           72 │             57833 │      364 │         55 │
│ maximum │       5510 │    2995 │      1373 │       1622 │           81 │            316992 │      405 │         58 │
│   stdev │        138 │      52 │        42 │         19 │            4 │            110619 │       19 │          2 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "tree_mutable.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       8534 │    5044 │      2000 │       3026 │           85 │              5281 │      474 │         58 │
│  median │       8984 │    5428 │      2344 │       3077 │          103 │             52542 │      615 │         60 │
│ maximum │       9281 │    5660 │      2569 │       3130 │          139 │            342835 │      694 │         63 │
│   stdev │        170 │     155 │       140 │         27 │           15 │            110708 │       54 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "mergesort_parallel"
bench = "mergesort_parallel.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       3076 │     680 │       388 │        245 │           64 │              1853 │     1335 │         20 │
│  median │       3966 │     832 │       525 │        305 │           95 │              2074 │     2003 │         21 │
│ maximum │       4304 │     888 │       565 │        340 │          127 │              3864 │     2138 │         22 │
│   stdev │        279 │      55 │        45 │         19 │           15 │               391 │      203 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "mm_divide_and_conquer"
bench = "mm_divide_and_conquer.jl"
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
[ Info: Setting GC memory pressure callback
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       1402 │     142 │        86 │         56 │           21 │            220743 │     2486 │          8 │
│  median │       1509 │     148 │        89 │         59 │           24 │            242986 │     2608 │         10 │
│ maximum │       1926 │     154 │        95 │         61 │           26 │            262792 │     2724 │         11 │
│   stdev │        155 │       3 │         3 │          1 │            2 │             11427 │       64 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘

@d-netto d-netto added the merge me PR is reviewed. Merge when all tests are passing label Mar 8, 2024
@d-netto d-netto merged commit bb35dc9 into master Mar 8, 2024
6 of 8 checks passed
@d-netto d-netto deleted the dcn-optimize-remset-marking branch March 8, 2024 21:44
@d-netto d-netto removed the merge me PR is reviewed. Merge when all tests are passing label Mar 8, 2024
mkitti pushed a commit to mkitti/julia that referenced this pull request Apr 13, 2024
Tag the lowest bit of a pointer to indicate it's in the remset and
enqueue objects in the remset for later processing when GC threads have
woken up, instead of sequentially marking them all at once.

In principle, this should allow for more parallelism in the mark phase,
though I didn't benchmark it yet.
d-netto added a commit to RelationalAI/julia that referenced this pull request Jun 28, 2024
Tag the lowest bit of a pointer to indicate it's in the remset and
enqueue objects in the remset for later processing when GC threads have
woken up, instead of sequentially marking them all at once.

In principle, this should allow for more parallelism in the mark phase,
though I didn't benchmark it yet.
d-netto added a commit to RelationalAI/julia that referenced this pull request Jul 3, 2024
Tag the lowest bit of a pointer to indicate it's in the remset and
enqueue objects in the remset for later processing when GC threads have
woken up, instead of sequentially marking them all at once.

In principle, this should allow for more parallelism in the mark phase,
though I didn't benchmark it yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GC Garbage collector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants