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

Simplify sweeping of big values #54936

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Simplify sweeping of big values #54936

wants to merge 6 commits into from

Conversation

d-netto
Copy link
Member

@d-netto d-netto commented Jun 26, 2024

Simplifies the layout of the doubly linked list of big objects to make it a bit more canonical: let's just store a pointer to the previous element, instead of storing a "pointer to the next element of the previous element". This should make the implementation a bit easier to understand without incurring any memory overhead.

Also introduces thread-local lists of objects that need to be fixed up due to mark_reset_age, and does this fix-up in the sweeping itself: doing it in the mark phase as we're doing it now is quite confusing and may introduce contention since we need to grab gc_cache_lock when doing so.

I ran the serial and multithreaded benchmarks from GCBenchmarks and this seems fairly close to performance neutral on my machine, but more benchmarking is needed.

@d-netto d-netto added the GC Garbage collector label Jun 26, 2024
@d-netto d-netto requested review from vtjnash and gbaraldi June 26, 2024 02:57
@d-netto d-netto marked this pull request as draft June 26, 2024 03:06
@d-netto
Copy link
Member Author

d-netto commented Jun 26, 2024

Marking as draft until the x64 failure is investigated.

@d-netto d-netto force-pushed the dcn-sweep-bigvals branch 3 times, most recently from 8020759 to a271d93 Compare June 26, 2024 03:55
@gbaraldi
Copy link
Member

Btw, since you are changing this code, is the linked list an efficient enough data structure for this? I haven't measured the overhead of sweeping through this so I'm not sure but it's potentially a place where we spent some time pointer chasing.

@d-netto d-netto force-pushed the dcn-sweep-bigvals branch 17 times, most recently from 1b7041f to 3ad2b27 Compare June 27, 2024 14:56
@d-netto
Copy link
Member Author

d-netto commented Jun 27, 2024

is the linked list an efficient enough data structure for this

Probably?

Note that the sweeping code will need to access the GC bits in bigval_t and the next/prev pointers are in the same cache line as the GC bits, so manipulating the linked list will probably not incur that much extra cost in terms of cache misses.

@d-netto d-netto force-pushed the dcn-sweep-bigvals branch 3 times, most recently from f1c762c to 64b1fe4 Compare June 28, 2024 16:27
@d-netto d-netto force-pushed the dcn-sweep-bigvals branch 4 times, most recently from 3a59ea4 to be08e43 Compare June 28, 2024 17:34
@d-netto
Copy link
Member Author

d-netto commented Jun 28, 2024

Re-ran the benchmarks and looks close to performance neutral on the serial & multithreaded GCBenchmarks. Serial ones were run with 1 thread, multithreaded ones with 8 mutators and 8 GC threads.

  • master
category = "TimeZones"
bench = "TimeZones.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       2478 │     326 │       255 │         68 │          137 │                21 │     7002 │         13 │
│  median │       2538 │     345 │       272 │         73 │          138 │                26 │     7010 │         14 │
│ maximum │       2621 │     384 │       299 │         85 │          164 │                27 │     7048 │         15 │
│   stdev │         55 │      24 │        17 │          8 │           11 │                 3 │       21 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "append"
bench = "append.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │        882 │     273 │       179 │         94 │           64 │                88 │     4033 │         31 │
│  median │        911 │     282 │       182 │        101 │           65 │                98 │     4036 │         31 │
│ maximum │        927 │     291 │       187 │        104 │           72 │               100 │     4036 │         31 │
│   stdev │         17 │       7 │         3 │          4 │            4 │                 5 │        1 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "big_arrays"
bench = "many_refs.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       1166 │     917 │       851 │         60 │          297 │                10 │      872 │         79 │
│  median │       1171 │     926 │       856 │         75 │          327 │                12 │      939 │         79 │
│ maximum │       1181 │     938 │       863 │         77 │          335 │                13 │      942 │         79 │
│   stdev │          6 │       8 │         5 │          7 │           17 │                 1 │       37 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "single_ref.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │        488 │     342 │       332 │         10 │          125 │                16 │      872 │         70 │
│  median │        543 │     393 │       381 │         12 │          126 │                18 │      877 │         72 │
│ maximum │        562 │     413 │       402 │         12 │          142 │                24 │      941 │         73 │
│   stdev │         34 │      32 │        31 │          1 │            7 │                 3 │       36 │          2 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "bigint"
bench = "pollard.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │        462 │     117 │       105 │         11 │           47 │                52 │      145 │         22 │
│  median │        464 │     118 │       107 │         11 │           48 │                56 │      146 │         25 │
│ maximum │        534 │     121 │       110 │         12 │           52 │                69 │      149 │         26 │
│   stdev │         31 │       2 │         2 │          0 │            2 │                 7 │        2 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "linked"
bench = "list.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       3250 │    2603 │      2357 │        246 │         1058 │                65 │     3304 │         80 │
│  median │       3284 │    2629 │      2380 │        249 │         1062 │                71 │     3331 │         80 │
│ maximum │       3327 │    2673 │      2407 │        272 │         1062 │                74 │     3336 │         80 │
│   stdev │         30 │      28 │        18 │         12 │            2 │                 4 │       13 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "tree.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       6416 │     367 │       361 │          6 │          293 │                22 │      196 │          6 │
│  median │       6471 │     388 │       381 │          6 │          310 │                25 │      197 │          6 │
│ maximum │       6645 │     420 │       414 │          7 │          340 │                25 │      197 │          6 │
│   stdev │         92 │      22 │        21 │          0 │           19 │                 2 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "strings"
bench = "strings.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │      14755 │    2105 │      1897 │        208 │          735 │                88 │      766 │         14 │
│  median │      15234 │    2141 │      1932 │        210 │          743 │                91 │      771 │         14 │
│ maximum │      15334 │    2162 │      1950 │        212 │          761 │                94 │      779 │         14 │
│   stdev │        240 │      24 │        23 │          1 │           12 │                 2 │        5 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       5281 │    1038 │       495 │        543 │           13 │            102115 │      168 │         20 │
│  median │       5361 │    1108 │       514 │        593 │           17 │            106933 │      169 │         21 │
│ maximum │       5505 │    1148 │       534 │        613 │           21 │            113576 │      171 │         21 │
│   stdev │         85 │      40 │        14 │         26 │            3 │              4131 │        1 │          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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       6619 │    3705 │      2744 │        960 │          565 │             19690 │     7435 │         56 │
│  median │       6891 │    4018 │      2956 │       1048 │          634 │             20580 │     9105 │         58 │
│ maximum │       7058 │    4148 │      3048 │       1099 │          664 │             43925 │    10004 │         59 │
│   stdev │        171 │     169 │       115 │         56 │           37 │             10487 │      999 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       2238 │    1255 │       671 │        546 │           37 │              4525 │      396 │         55 │
│  median │       2259 │    1258 │       693 │        575 │           38 │              4948 │      410 │         56 │
│ maximum │       2301 │    1302 │       725 │        587 │           39 │              5280 │      420 │         57 │
│   stdev │         25 │      20 │        24 │         16 │            1 │               283 │        9 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       3904 │    2413 │      1060 │       1345 │           55 │              5466 │      702 │         62 │
│  median │       4007 │    2473 │      1100 │       1362 │           59 │              5782 │      717 │         62 │
│ maximum │       4121 │    2602 │      1128 │       1502 │           62 │              6015 │      731 │         63 │
│   stdev │         92 │      74 │        25 │         67 │            3 │               225 │       12 │          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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       2152 │     406 │       248 │        158 │           34 │              1187 │     1150 │         19 │
│  median │       2231 │     443 │       271 │        169 │           41 │              1421 │     1197 │         20 │
│ maximum │       2266 │     452 │       278 │        177 │           46 │              1515 │     1216 │         20 │
│   stdev │         43 │      18 │        12 │          7 │            5 │               146 │       26 │          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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │        524 │      85 │        58 │         26 │           14 │             56062 │     2260 │         16 │
│  median │        528 │      87 │        61 │         27 │           14 │             61352 │     2413 │         16 │
│ maximum │        532 │      94 │        65 │         29 │           17 │             63448 │     2483 │         18 │
│   stdev │          3 │       4 │         2 │          1 │            1 │              2989 │       87 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
  • PR:
category = "TimeZones"
bench = "TimeZones.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       2505 │     330 │       248 │         82 │          135 │                22 │     6973 │         13 │
│  median │       2516 │     331 │       248 │         82 │          135 │                25 │     6982 │         13 │
│ maximum │       2522 │     336 │       254 │         83 │          137 │                28 │     7018 │         13 │
│   stdev │          6 │       2 │         3 │          1 │            1 │                 2 │       18 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "append"
bench = "append.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │        897 │     275 │       181 │         93 │           64 │                89 │     4036 │         31 │
│  median │        906 │     280 │       182 │         98 │           69 │                90 │     4036 │         31 │
│ maximum │        908 │     283 │       183 │        100 │           70 │                99 │     4036 │         31 │
│   stdev │          5 │       3 │         0 │          3 │            3 │                 5 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "big_arrays"
bench = "many_refs.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       1172 │     929 │       867 │         59 │          307 │                12 │      872 │         79 │
│  median │       1177 │     935 │       873 │         60 │          312 │                16 │      878 │         79 │
│ maximum │       1194 │     949 │       875 │         76 │          333 │                18 │      941 │         80 │
│   stdev │          9 │       8 │         4 │          9 │           12 │                 3 │       36 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "single_ref.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │        491 │     344 │       334 │         10 │          125 │                16 │      877 │         70 │
│  median │        537 │     390 │       378 │         12 │          126 │                17 │      941 │         73 │
│ maximum │        539 │     392 │       380 │         12 │          128 │                22 │      941 │         73 │
│   stdev │         21 │      21 │        20 │          1 │            1 │                 3 │       28 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "bigint"
bench = "pollard.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │        449 │     115 │       105 │         11 │           47 │                47 │      145 │         25 │
│  median │        468 │     122 │       111 │         11 │           48 │                49 │      147 │         26 │
│ maximum │        473 │     126 │       114 │         12 │           49 │                59 │      147 │         27 │
│   stdev │         10 │       4 │         4 │          0 │            1 │                 5 │        1 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "linked"
bench = "list.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       3262 │    2610 │      2357 │        244 │         1045 │                60 │     3307 │         80 │
│  median │       3266 │    2614 │      2368 │        246 │         1054 │                71 │     3332 │         80 │
│ maximum │       3284 │    2635 │      2384 │        258 │         1067 │                77 │     3335 │         80 │
│   stdev │          9 │      10 │         9 │          6 │            9 │                 6 │       12 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
bench = "tree.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       6307 │     376 │       370 │          6 │          293 │                22 │      196 │          6 │
│  median │       6315 │     380 │       374 │          7 │          299 │                24 │      196 │          6 │
│ maximum │       6359 │     386 │       380 │          7 │          303 │                28 │      197 │          6 │
│   stdev │         21 │       5 │         5 │          0 │            4 │                 2 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
category = "strings"
bench = "strings.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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │      14607 │    2148 │      1941 │        206 │          726 │                82 │      772 │         15 │
│  median │      14723 │    2162 │      1953 │        210 │          740 │                87 │      782 │         15 │
│ maximum │      14889 │    2172 │      1961 │        210 │          748 │                91 │      784 │         15 │
│   stdev │        121 │      10 │         8 │          2 │            8 │                 3 │        5 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       5174 │    1029 │       473 │        542 │           13 │            103370 │      168 │         20 │
│  median │       5239 │    1053 │       507 │        551 │           13 │            104364 │      168 │         20 │
│ maximum │       5375 │    1068 │       517 │        561 │           14 │            110826 │      171 │         20 │
│   stdev │         74 │      16 │        18 │          8 │            1 │              2991 │        1 │          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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       6516 │    3664 │      2709 │        955 │          531 │             22788 │     7827 │         56 │
│  median │       6731 │    3876 │      2869 │       1007 │          597 │             23740 │     8301 │         58 │
│ maximum │       6874 │    3987 │      2926 │       1061 │          628 │             26962 │     9026 │         58 │
│   stdev │        130 │     120 │        85 │         38 │           36 │              1962 │      429 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       2225 │    1236 │       674 │        554 │           36 │              4329 │      392 │         55 │
│  median │       2261 │    1274 │       711 │        574 │           39 │              4828 │      418 │         56 │
│ maximum │       2317 │    1298 │       713 │        594 │           41 │              5086 │      429 │         57 │
│   stdev │         37 │      23 │        19 │         16 │            2 │               340 │       14 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       3914 │    2361 │      1070 │       1265 │           55 │              5473 │      681 │         56 │
│  median │       3934 │    2452 │      1095 │       1353 │           56 │              5876 │      690 │         62 │
│ maximum │       4230 │    2472 │      1099 │       1401 │           57 │              6323 │      721 │         63 │
│   stdev │        134 │      44 │        12 │         50 │            1 │               316 │       16 │          3 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       2187 │     414 │       250 │        163 │           41 │              1289 │     1164 │         19 │
│  median │       2255 │     481 │       275 │        208 │           56 │              1388 │     1257 │         21 │
│ maximum │       2311 │     534 │       289 │        245 │           64 │              1576 │     1302 │         24 │
│   stdev │         48 │      47 │        17 │         31 │            8 │               130 │       63 │          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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │        510 │      84 │        57 │         26 │           13 │             57840 │     2296 │         16 │
│  median │        523 │      87 │        61 │         27 │           14 │             61105 │     2447 │         17 │
│ maximum │        553 │     105 │        76 │         32 │           26 │             67510 │     2459 │         19 │
│   stdev │         16 │       9 │         7 │          3 │            5 │              4141 │       72 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘

@d-netto d-netto marked this pull request as ready for review June 28, 2024 18:09
@d-netto d-netto changed the title Simplify sweeping of big values by making list of old objects thread-local Simplify sweeping of big values Jun 28, 2024
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.

None yet

2 participants