https://github.com/JuliaLang/julia
Revision 973b4ff9abb6e12cada196a9c97a96b358275e16 authored by Diogo Netto on 04 March 2024, 16:16:28 UTC, committed by GitHub on 04 March 2024, 16:16:28 UTC
This regression at a large number of GC threads still shows up on a
large aarch64 machine (80-core ARM Neoverse N1).

```
bench = "many_refs.jl"
(gcthreads, threads) = (1, 1)
[ 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 │       3807 │    2826 │      2633 │        193 │          960 │                13 │      892 │         74 │
│  median │       3810 │    2826 │      2633 │        193 │          961 │                15 │      892 │         74 │
│ maximum │       3810 │    2831 │      2638 │        193 │          962 │                27 │      892 │         74 │
│   stdev │          2 │       3 │         3 │          0 │            1 │                 7 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
(gcthreads, threads) = (2, 1)
[ 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 │       2455 │    1476 │      1350 │        126 │          488 │                20 │      892 │         60 │
│  median │       2459 │    1478 │      1352 │        126 │          489 │                23 │      892 │         60 │
│ maximum │       2465 │    1479 │      1352 │        126 │          489 │                23 │      893 │         60 │
│   stdev │          5 │       1 │         1 │          0 │            1 │                 2 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
(gcthreads, threads) = (4, 1)
[ 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 │       2173 │    1194 │      1115 │         77 │          463 │                18 │      892 │         54 │
│  median │       2187 │    1194 │      1116 │         78 │          463 │                19 │      893 │         55 │
│ maximum │       2217 │    1208 │      1130 │         78 │          463 │                19 │      893 │         55 │
│   stdev │         22 │       8 │         8 │          1 │            0 │                 1 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
(gcthreads, threads) = (8, 1)
[ 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 │    1212 │      1149 │         63 │          539 │                19 │      901 │         55 │
│  median │       2199 │    1219 │      1156 │         63 │          540 │                20 │      901 │         55 │
│ maximum │       2201 │    1222 │      1157 │         65 │          540 │                20 │      901 │         56 │
│   stdev │          5 │       5 │         4 │          1 │            1 │                 1 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
(gcthreads, threads) = (16, 1)
[ 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 │       3897 │    2916 │      2854 │         60 │         1423 │                20 │      902 │         75 │
│  median │       4012 │    3032 │      2972 │         62 │         1491 │                21 │      904 │         75 │
│ maximum │       4026 │    3106 │      3044 │         62 │         1511 │                22 │      904 │         77 │
│   stdev │         70 │      96 │        96 │          1 │           46 │                 1 │        1 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
```

This patch seems to improve performance at 16 GC threads though we still
have some negative scaling for this benchmark beyond 8 GC threads
(others seem fine). I didn't test whether this is indeed the optimal
struct layout for the queue in this benchmark.

```
bench = "many_refs.jl"
(gcthreads, threads) = (1, 1)
[ 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 │       3807 │    2822 │      2630 │        193 │          959 │                15 │      892 │         74 │
│  median │       3824 │    2823 │      2630 │        193 │          959 │                15 │      892 │         74 │
│ maximum │       4307 │    3194 │      2974 │        220 │         1086 │                19 │      892 │         74 │
│   stdev │        284 │     215 │       199 │         16 │           74 │                 2 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
(gcthreads, threads) = (2, 1)
[ 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 │       2459 │    1476 │      1349 │        126 │          488 │                19 │      892 │         60 │
│  median │       2460 │    1479 │      1352 │        127 │          488 │                21 │      893 │         60 │
│ maximum │       2770 │    1661 │      1526 │        135 │          570 │                22 │      893 │         60 │
│   stdev │        179 │     106 │       101 │          5 │           47 │                 1 │        0 │          0 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
(gcthreads, threads) = (4, 1)
[ 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 │       2215 │    1233 │      1155 │         77 │          485 │                20 │      892 │         53 │
│  median │       2320 │    1248 │      1171 │         78 │          492 │                21 │      893 │         54 │
│ maximum │       2372 │    1259 │      1176 │         83 │          493 │                22 │      893 │         56 │
│   stdev │         80 │      13 │        11 │          3 │            5 │                 1 │        1 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
(gcthreads, threads) = (8, 1)
[ 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 │       2204 │    1220 │      1156 │         64 │          544 │                23 │      901 │         53 │
│  median │       2362 │    1249 │      1181 │         64 │          553 │                23 │      901 │         53 │
│ maximum │       2374 │    1261 │      1196 │         68 │          558 │                25 │      901 │         55 │
│   stdev │         95 │      21 │        20 │          2 │            7 │                 1 │        0 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
(gcthreads, threads) = (16, 1)
[ 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 │       2502 │    1519 │      1458 │         62 │          721 │                22 │      902 │         58 │
│  median │       2511 │    1524 │      1461 │         63 │          728 │                23 │      903 │         61 │
│ maximum │       2664 │    1554 │      1486 │         68 │          741 │                25 │      905 │         61 │
│   stdev │         91 │      19 │        16 │          3 │           10 │                 1 │        2 │          1 │
└─────────┴────────────┴─────────┴───────────┴────────────┴──────────────┴───────────────────┴──────────┴────────────┘
```
1 parent 4d5a20d
History
Tip revision: 973b4ff9abb6e12cada196a9c97a96b358275e16 authored by Diogo Netto on 04 March 2024, 16:16:28 UTC
yet more atomics & cache-line fixes on work-stealing queue (#53424)
Tip revision: 973b4ff
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 371 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 571 bytes
.mailmap -rw-r--r-- 12.7 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 1012 bytes
CONTRIBUTING.md -rw-r--r-- 23.4 KB
HISTORY.md -rw-r--r-- 388.1 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 56.1 KB
Makefile -rw-r--r-- 30.2 KB
NEWS.md -rw-r--r-- 3.6 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.9 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 37.8 KB
pkgimage.mk -rw-r--r-- 7.1 KB
sysimage.mk -rw-r--r-- 4.2 KB
typos.toml -rw-r--r-- 78 bytes

README.md

back to top