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 handling of buffered pages #54961

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

d-netto
Copy link
Member

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

Quick test to try to simplify handling of buffered pages by keeping them in a single place (global_page_pool_lazily_freed) instead of making them thread local.

Marking as draft since performance hasn't been assessed yet.

@d-netto d-netto added the GC Garbage collector label Jun 27, 2024
@d-netto d-netto marked this pull request as draft June 27, 2024 16:06
@d-netto d-netto force-pushed the dcn-simplify-handling-of-buffered-pages branch from 0457669 to 3585bb5 Compare June 27, 2024 19:28
@d-netto
Copy link
Member Author

d-netto commented Jun 27, 2024

Ok, this code cleanup seems to be basically performance neutral in the GCBenchmarks, which is not really surprising since global_page_pool_lazily_freed is already lock-free and we also don't seem to have a lot of contention there.

Serial benchmarks were run with a single 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 │       2496 │     310 │       248 │         62 │          129 │                23 │     6956 │         12 │
│  median │       2560 │     339 │       258 │         73 │          138 │                25 │     7018 │         13 │
│ maximum │       2650 │     363 │       279 │         85 │          147 │                26 │     7067 │         14 │
│   stdev │         63 │      21 │        13 │          9 │            7 │                 1 │       40 │          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 │        910 │     278 │       179 │         99 │           64 │                87 │     4036 │         30 │
│  median │        918 │     282 │       182 │        100 │           64 │                91 │     4036 │         31 │
│ maximum │        919 │     289 │       182 │        107 │           68 │                96 │     4036 │         32 │
│   stdev │          4 │       4 │         1 │          3 │            2 │                 4 │        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 │       1161 │     910 │       850 │         59 │          298 │                11 │      872 │         78 │
│  median │       1166 │     923 │       861 │         61 │          306 │                14 │      876 │         79 │
│ maximum │       1179 │     932 │       871 │         64 │          313 │                15 │      877 │         79 │
│   stdev │          7 │       8 │         7 │          2 │            6 │                 2 │        2 │          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 │     343 │       334 │         10 │          125 │                16 │      870 │         70 │
│  median │        502 │     351 │       341 │         10 │          131 │                17 │      874 │         70 │
│ maximum │        595 │     445 │       434 │         11 │          170 │                19 │      876 │         75 │
│   stdev │         43 │      43 │        42 │          0 │           19 │                 1 │        2 │          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 │        463 │     115 │       104 │         11 │           47 │                56 │      144 │         25 │
│  median │        470 │     120 │       108 │         11 │           47 │                60 │      145 │         25 │
│ maximum │        493 │     125 │       114 │         12 │           52 │                67 │      147 │         26 │
│   stdev │         13 │       4 │         4 │          0 │            2 │                 4 │        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 │       3287 │    2634 │      2376 │        249 │         1059 │                62 │     3330 │         80 │
│  median │       3293 │    2643 │      2386 │        260 │         1077 │                69 │     3334 │         80 │
│ maximum │       3324 │    2668 │      2397 │        279 │         1094 │                72 │     3338 │         80 │
│   stdev │         17 │      15 │         7 │         11 │           16 │                 4 │        3 │          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 │       6591 │     388 │       382 │          7 │          306 │                21 │      196 │          6 │
│  median │       6825 │     403 │       396 │          7 │          315 │                24 │      196 │          6 │
│ maximum │       7011 │     435 │       428 │          7 │          326 │                26 │      196 │          6 │
│   stdev │        196 │      18 │        18 │          0 │            7 │                 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 │      15138 │    2085 │      1873 │        212 │          726 │                89 │      766 │         14 │
│  median │      15338 │    2141 │      1927 │        220 │          745 │                91 │      766 │         14 │
│ maximum │      15817 │    2327 │      2106 │        231 │          851 │                98 │      782 │         15 │
│   stdev │        273 │      96 │        93 │          7 │           50 │                 4 │        7 │          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 │       5351 │    1094 │       519 │        574 │           14 │            100374 │      168 │         20 │
│  median │       5406 │    1111 │       524 │        582 │           15 │            107375 │      168 │         21 │
│ maximum │       5483 │    1120 │       541 │        596 │           16 │            125039 │      170 │         21 │
│   stdev │         50 │      11 │         8 │          8 │            1 │             10039 │        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 │       6439 │    3596 │      2652 │        943 │          552 │             19212 │     7367 │         56 │
│  median │       6977 │    4011 │      2947 │       1064 │          605 │             23514 │     8232 │         57 │
│ maximum │       7320 │    4190 │      3076 │       1113 │          639 │             26087 │     9242 │         58 │
│   stdev │        337 │     240 │       170 │         70 │           35 │              2618 │      722 │          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 │       2310 │    1360 │       662 │        665 │           39 │              4659 │      403 │         56 │
│  median │       2388 │    1385 │       711 │        675 │           41 │              4759 │      415 │         58 │
│ maximum │       2468 │    1407 │       741 │        697 │           41 │              6178 │      425 │         59 │
│   stdev │         63 │      19 │        29 │         12 │            1 │               636 │        9 │          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 │       4243 │    2651 │      1073 │       1560 │           56 │              5832 │      691 │         61 │
│  median │       4311 │    2680 │      1100 │       1571 │           63 │              6073 │      699 │         62 │
│ maximum │       4475 │    2729 │      1158 │       1588 │           74 │              8653 │      731 │         62 │
│   stdev │         91 │      30 │        32 │         13 │            7 │              1173 │       17 │          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 │       2155 │     380 │       239 │        140 │           38 │              1199 │     1141 │         18 │
│  median │       2221 │     468 │       291 │        177 │           39 │              1284 │     1224 │         21 │
│ maximum │       2371 │     513 │       316 │        221 │           69 │              1956 │     1274 │         23 │
│   stdev │         81 │      55 │        28 │         30 │           14 │               308 │       53 │          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 │        519 │      86 │        60 │         25 │           12 │             54750 │     2369 │         16 │
│  median │        533 │      87 │        61 │         25 │           14 │             61505 │     2480 │         16 │
│ maximum │        551 │      97 │        71 │         26 │           17 │             64534 │     2525 │         18 │
│   stdev │         15 │       5 │         4 │          0 │            2 │              3869 │       64 │          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 │       2476 │     315 │       250 │         65 │          131 │                23 │     6970 │         13 │
│  median │       2532 │     340 │       258 │         72 │          132 │                27 │     6982 │         13 │
│ maximum │       2607 │     365 │       284 │         82 │          156 │                28 │     7009 │         14 │
│   stdev │         51 │      20 │        14 │          8 │           11 │                 2 │       17 │          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 │        914 │     282 │       183 │         99 │           63 │                91 │     4034 │         31 │
│  median │        922 │     290 │       187 │        100 │           66 │                97 │     4036 │         31 │
│ maximum │        940 │     300 │       197 │        104 │           66 │               106 │     4036 │         32 │
│   stdev │         10 │       7 │         5 │          2 │            1 │                 7 │        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 │       1159 │     916 │       857 │         59 │          299 │                11 │      869 │         79 │
│  median │       1164 │     920 │       860 │         59 │          304 │                14 │      874 │         79 │
│ maximum │       1196 │     949 │       873 │         79 │          333 │                15 │      876 │         79 │
│   stdev │         16 │      14 │         7 │          9 │           14 │                 1 │        2 │          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 │        490 │     344 │       334 │         10 │          125 │                14 │      872 │         70 │
│  median │        509 │     358 │       348 │         10 │          127 │                19 │      877 │         70 │
│ maximum │        548 │     400 │       388 │         12 │          134 │                22 │      941 │         73 │
│   stdev │         27 │      27 │        25 │          1 │            4 │                 3 │       30 │          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 │        456 │     116 │       105 │         11 │           47 │                45 │      145 │         19 │
│  median │        485 │     117 │       106 │         11 │           52 │                55 │      148 │         25 │
│ maximum │        628 │     125 │       113 │         12 │           53 │                76 │      150 │         26 │
│   stdev │         69 │       4 │         4 │          0 │            3 │                12 │        2 │          3 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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 │       2760 │    2107 │      1902 │        204 │          903 │                62 │     2658 │         76 │
│  median │       3332 │    2659 │      2398 │        250 │         1064 │                71 │     3308 │         80 │
│ maximum │       3378 │    2681 │      2409 │        272 │         1123 │                76 │     3332 │         80 │
│   stdev │        259 │     247 │       222 │         27 │           85 │                 6 │      296 │          2 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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 │       6452 │     382 │       376 │          6 │          299 │                20 │      196 │          6 │
│  median │       6692 │     402 │       396 │          7 │          310 │                23 │      196 │          6 │
│ maximum │       6887 │     422 │       416 │          7 │          338 │                25 │      196 │          6 │
│   stdev │        179 │      16 │        16 │          0 │           16 │                 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 │      14797 │    2107 │      1896 │        207 │          723 │                87 │      766 │         14 │
│  median │      15228 │    2144 │      1936 │        211 │          767 │                94 │      774 │         14 │
│ maximum │      15929 │    2276 │      2063 │        213 │          834 │                99 │      779 │         14 │
│   stdev │        425 │      69 │        67 │          3 │           41 │                 4 │        6 │          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 │       5354 │    1062 │       503 │        559 │           14 │             96973 │      168 │         20 │
│  median │       5447 │    1110 │       527 │        583 │           18 │            111595 │      168 │         20 │
│ maximum │       5655 │    1157 │       547 │        609 │           24 │            120109 │      169 │         21 │
│   stdev │        128 │      35 │        16 │         19 │            4 │              9480 │        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 │       6795 │    3688 │      2738 │        950 │          581 │             21299 │     7656 │         54 │
│  median │       7031 │    4131 │      3040 │       1065 │          641 │             24757 │     8421 │         58 │
│ maximum │       7309 │    4232 │      3086 │       1152 │          767 │             50978 │    10124 │         59 │
│   stdev │        197 │     214 │       145 │         74 │           68 │             12412 │      981 │          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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       2230 │    1241 │       688 │        551 │           39 │              4828 │      401 │         54 │
│  median │       2277 │    1268 │       695 │        573 │           40 │              5247 │      421 │         56 │
│ maximum │       2381 │    1396 │       728 │        668 │           46 │              9339 │      430 │         59 │
│   stdev │         58 │      64 │        16 │         48 │            3 │              1860 │       11 │          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
┌─────────┬────────────┬─────────┬───────────┬────────────┬──────────────┬───────────────────┬──────────┬────────────┐
│         │ 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 │       3859 │    2371 │      1056 │       1315 │           56 │              5704 │      707 │         61 │
│  median │       4105 │    2520 │      1144 │       1380 │           65 │              6198 │      720 │         63 │
│ maximum │       4202 │    2662 │      1226 │       1445 │           90 │              8353 │      741 │         63 │
│   stdev │        130 │     108 │        61 │         53 │           16 │              1040 │       13 │          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 │       2191 │     426 │       257 │        166 │           32 │              1251 │     1168 │         19 │
│  median │       2287 │     487 │       291 │        195 │           50 │              1337 │     1267 │         21 │
│ maximum │       2350 │     625 │       302 │        332 │          165 │              1509 │     1278 │         27 │
│   stdev │         57 │      80 │        21 │         68 │           55 │                98 │       58 │          3 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
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 │        515 │      85 │        60 │         25 │           12 │             56657 │     2315 │         16 │
│  median │        521 │      87 │        60 │         26 │           13 │             58525 │     2414 │         17 │
│ maximum │        527 │      89 │        62 │         29 │           14 │             65312 │     2486 │         17 │
│   stdev │          5 │       2 │         1 │          1 │            1 │              3301 │       62 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘

@d-netto d-netto marked this pull request as ready for review June 27, 2024 20:01
@d-netto d-netto requested a review from gbaraldi June 27, 2024 20:01
@d-netto d-netto force-pushed the dcn-simplify-handling-of-buffered-pages branch from 3585bb5 to 2de0587 Compare June 27, 2024 21:46
@d-netto d-netto merged commit 334e4d9 into master Jun 28, 2024
7 checks passed
@d-netto d-netto deleted the dcn-simplify-handling-of-buffered-pages branch June 28, 2024 15:46
d-netto added a commit to RelationalAI/julia that referenced this pull request Jun 28, 2024
Simplifies handling of buffered pages by keeping them in a single place (`global_page_pool_lazily_freed`) instead of making them thread local. Performance has been assessed on the serial & multithreaded GCBenchmarks and it has shown to be performance neutral.
d-netto added a commit to RelationalAI/julia that referenced this pull request Jul 3, 2024
Simplifies handling of buffered pages by keeping them in a single place (`global_page_pool_lazily_freed`) instead of making them thread local. Performance has been assessed on the serial & multithreaded GCBenchmarks and it has shown to be performance neutral.
oscardssmith pushed a commit that referenced this pull request Aug 14, 2024
We have parallel sweeping on 1.11, so we should use atomics here.

This issue has already been fixed on master due to
#54961.

We can also backport #54961 to
release-1.11, but I have some preference to land this one since it's
considerably less disruptive and we're already on RC2.
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.

1 participant