RFR: Plab fallback to minsize
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Jan 6 19:56:38 UTC 2023
If there is not sufficient memory within a region to allocate the desired size of a PLAB, try to allocate a smaller PLAB that is still larger than the minimum PLAB size. This allows more efficient packing of PLABs into available old-gen heap regions.
This patch has been exercised by an internal CI regression testing pipeline and has not introduced any regressions.
Modest reductions in evacuation efforts are seen on benchmarks that do heavy promotion. This is presumably because there are fewer promotion failures, thus less need to repeatedly copy "old" objects within young-gen spaces. Of note, but not entirely explained, is the observation that some evacuation effort has shifted from mutator threads to GC worker threads.
Some regression in jhiccup pause times were observed. This will be explored further after additional patches are integrated.
x86 results:
+49.22% extremem-phased/jhiccup_max_pause
Control: 0.560ms (+/-467.41ms) 104600
Test: 0.835ms (+/-466.68ms) 12291
+28.58% hyperalloc_a2048_o1536/context_switch_count
Control: 3945.242 (+/-1228.11 ) 82
Test: 5072.625 (+/-427.15 ) 10
+20.21% extremem-phased/cpu_user
Control: 2323.752s (+/-592.18s ) 85
Test: 2793.378s (+/- 74.48s ) 10
+19.23% hyperalloc_a2048_o1536/jhiccup_max_pause
Control: 0.613ms (+/- 1.32ms) 9840
Test: 0.731ms (+/- 1.40ms) 1200
+16.37% hyperalloc_a2048_o1536/cpu_user
Control: 372.456s (+/- 67.33s ) 82
Test: 433.434s (+/- 10.54s ) 10
+13.72% extremem/worker_objects
Control: 228174.968 (+/-274656.55 ) 47085
Test: 259476.534 (+/-300553.34 ) 3012
+12.87% xalan/concurrent_marking
Control: 9.055ms (+/- 6.82ms) 7640
Test: 10.221ms (+/- 6.55ms) 561
+11.57% specjbb2015/pause_degenerated_gc_n
Control: 921.116ms (+/-627.42ms) 6423
Test: 1.028s (+/-654.58ms) 782
+11.56% specjbb2015/pause_degenerated_gc_g
Control: 923.790ms (+/-629.01ms) 6423
Test: 1.031s (+/-656.16ms) 782
-206.91% extremem/mutator_evacuated
Control: 128640.328 (+/-1870500.79 ) 47085
Test: 41914.998 (+/-2374222.03 ) 3012
-148.23% hyperalloc_a2048_o1536/mutator_evacuated
Control: 1755.404 (+/-3710823.53 ) 18356
Test: 707.164 (+/-3055167.84 ) 3374
-120.26% hyperalloc_a2048_o1536/mutator_objects
Control: 6.337 (+/-14949.35 ) 18356
Test: 2.877 (+/-12293.11 ) 3374
-83.34% extremem/mutator_objects
Control: 1834.425 (+/-7838.57 ) 47085
Test: 1000.564 (+/-9461.24 ) 3012
-62.39% extremem/concurrent_thread_roots
Control: 3.298ms (+/- 5.49ms) 3408
Test: 2.031ms (+/- 4.06ms) 650
-60.85% hyperalloc_a2048_o1536/concurrent_evacuation
Control: 11.389ms (+/- 33.55ms) 5943
Test: 7.081ms (+/- 30.34ms) 986
-59.21% hyperalloc_a3072_o1536/concurrent_evacuation
Control: 6.744ms (+/- 29.91ms) 9195
Test: 4.236ms (+/- 27.88ms) 1279
-55.74% hyperalloc_a3072_o1536/mutator_evacuated
Control: 995.822 (+/-3008122.97 ) 31761
Test: 639.419 (+/-2714463.89 ) 4564
-48.55% hyperalloc_a3072_o1536/mutator_objects
Control: 4.018 (+/-12124.35 ) 31761
Test: 2.705 (+/-10918.88 ) 4564
-47.30% extremem/concurrent_mark_roots
Control: 3.114ms (+/- 5.37ms) 4065
Test: 2.114ms (+/- 4.21ms) 674
aarch64 results:
+20.28% extremem-phased/jhiccup_max_pause
Control: 0.391ms (+/-778.03ms) 101414
Test: 0.471ms (+/-506.86ms) 12270
+16.56% xalan/jhiccup_max_pause
Control: 2.806ms (+/- 3.57ms) 4943
Test: 3.271ms (+/- 3.60ms) 586
+12.43% hyperalloc_a2048_o1536/cpu_user
Control: 387.646s (+/- 62.67s ) 81
Test: 435.835s (+/- 10.43s ) 10
+11.45% specjbb2015/pause_degenerated_gc_n
Control: 1.305s (+/-855.27ms) 6504
Test: 1.455s (+/-874.27ms) 840
+11.43% specjbb2015/pause_degenerated_gc_g
Control: 1.309s (+/-857.67ms) 6504
Test: 1.459s (+/-876.46ms) 840
+10.42% extremem-phased/cpu_user
Control: 3285.986s (+/-822.03s ) 85
Test: 3628.380s (+/- 99.52s ) 10
-206.42% extremem/mutator_evacuated
Control: 215404.352 (+/-1220778.32 ) 24514
Test: 70298.169 (+/-909463.44 ) 3011
-156.88% extremem/mutator_objects
Control: 4341.422 (+/-15179.61 ) 24514
Test: 1690.048 (+/-8677.87 ) 3011
-117.99% hyperalloc_a2048_o1536/mutator_evacuated
Control: 1086.398 (+/-2790294.87 ) 18643
Test: 498.373 (+/-2253567.56 ) 3318
-101.55% hyperalloc_a2048_o1536/mutator_objects
Control: 4.146 (+/-11259.63 ) 18643
Test: 2.057 (+/-9112.94 ) 3318
-70.56% hyperalloc_a3072_o1536/concurrent_evacuation
Control: 6.078ms (+/- 24.65ms) 8977
Test: 3.563ms (+/- 22.93ms) 1258
-65.62% extremem-phased/reconstruct_remembered_set
Control: 190.987ms (+/-136.41ms) 1305
Test: 115.314ms (+/-154.77ms) 96
-56.62% hyperalloc_a3072_o1536/mutator_evacuated
Control: 628.225 (+/-2364040.76 ) 31963
Test: 401.114 (+/-2138629.77 ) 4629
-51.32% hyperalloc_a3072_o1536/mutator_objects
Control: 2.598 (+/-9519.49 ) 31963
Test: 1.717 (+/-8639.65 ) 4629
-48.41% extremem/concurrent_update_thread_roots
Control: 4.723ms (+/- 10.75ms) 5357
Test: 3.182ms (+/- 8.55ms) 658
-48.04% hyperalloc_a2048_o1536/concurrent_evacuation
Control: 9.702ms (+/- 27.76ms) 6218
Test: 6.553ms (+/- 24.74ms) 969
-------------
Commit messages:
- Remove instrumentation and fix miscalculations in allocate_aligned
- Fix bugs when downsizing PLAB allocation request
- allocate_aligned tries smaller size if insufficient memory for full size
Changes: https://git.openjdk.org/shenandoah/pull/195/files
Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=195&range=00
Stats: 66 lines in 3 files changed: 38 ins; 9 del; 19 mod
Patch: https://git.openjdk.org/shenandoah/pull/195.diff
Fetch: git fetch https://git.openjdk.org/shenandoah pull/195/head:pull/195
PR: https://git.openjdk.org/shenandoah/pull/195
More information about the shenandoah-dev
mailing list