RFR: 8324649: Shenandoah: refactor implementation of free set
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Jan 24 16:27:35 UTC 2024
Several objectives:
1. Reduce humongous allocation failures by segregating regular regions from humongous regions
2. Do not retire regions just because an allocation failed within the region if the memory remaining within the region is large enough to represent a LAB
3. Track range of empty regions in addition to range of available regions in order to expedite humongous allocations
4. Treat collector reserves as available for Mutator allocations after evacuation completes
5. Improve encapsulation so as to enable an OldCollector reserve for future integration of generational Shenandoah
On internal performance pipelines, this change shows:
1. some Increase in page faults and rss_max with certain workloads, presumably because of "segregation" of humongous from regular regions.
2. An increase in CPU time on certain benchmarks: sunflow (+165%), scimark.sparse.small (+51%), scimark.sparse.large (+50%), lusearch (+43%). This may result from potentially smaller tlabs and/or more effort required to allocate tlabs in the presence of failed shared allocation requests (which no longer immediately retire regions).
3. An increase in trigger_failure for the hyperalloc_a2048_o4096 experiment (not yet understood)
4. 2-30x improvements on multiple metrics of the Extremem phased workload latencies (most likely resulting from fewer degenerated or full GCs)
Shenandoah
-------------------------------------------------------------------------------------------------------
+166.55% scimark.sparse.large/minor_page_fault_count p=0.00000
Control: 819938.875 (+/-5724.56 ) 40
Test: 2185552.625 (+/-26378.64 ) 20
+166.16% scimark.sparse.large/rss_max p=0.00000
Control: 3285226.375 (+/-22812.93 ) 40
Test: 8743881.500 (+/-104906.69 ) 20
+164.78% sunflow/cpu_system p=0.00000
Control: 1.280s (+/- 0.10s ) 40
Test: 3.390s (+/- 0.13s ) 20
+149.29% hyperalloc_a2048_o4096/trigger_failure p=0.00000
Control: 3.259 (+/- 1.46 ) 33
Test: 8.125 (+/- 2.05 ) 20
+143.75% pmd/major_page_fault_count p=0.03622
Control: 1.000 (+/- 0.00 ) 40
Test: 2.438 (+/- 2.59 ) 20
+80.22% lusearch/minor_page_fault_count p=0.00000
Control: 2043930.938 (+/-4777.14 ) 40
Test: 3683477.625 (+/-5650.29 ) 20
+50.50% scimark.sparse.small/minor_page_fault_count p=0.00000
Control: 697899.156 (+/-3457.82 ) 40
Test: 1050363.812 (+/-175237.63 ) 20
+49.97% scimark.sparse.small/rss_max p=0.00000
Control: 2770753.500 (+/-12066.99 ) 40
Test: 4155207.250 (+/-697962.18 ) 20
+49.64% scimark.sparse.large/cpu_system p=0.00000
Control: 2.895s (+/- 0.16s ) 40
Test: 4.333s (+/- 0.17s ) 20
+43.06% lusearch/cpu_system p=0.00000
Control: 13.548s (+/- 0.54s ) 40
Test: 19.381s (+/- 0.75s ) 20
-29013.76% extremem-phased/sales_transaction_p100 p=0.00000
Control: 558.238ms (+/-475.03ms) 40
Test: 1.917ms (+/- 1.02ms) 20
-27947.59% extremem-phased/browsing_history_p100 p=0.00000
Control: 707.150ms (+/-521.23ms) 40
Test: 2.521ms (+/- 1.17ms) 20
-25709.05% extremem-phased/do_nothing_p100 p=0.00000
Control: 445.271ms (+/-440.58ms) 40
Test: 1.725ms (+/- 1.13ms) 20
-23638.49% extremem-phased/customer_preparation_p99_9 p=0.00000
Control: 881.143ms (+/-426.72ms) 40
Test: 3.712ms (+/- 3.87ms) 20
-17642.10% extremem-phased/customer_abandonment_p99_9 p=0.00000
Control: 1.013s (+/-386.17ms) 40
Test: 5.712ms (+/- 68.47ms) 20
-924.72% extremem-phased/customer_preparation_p99_99 p=0.00000
Control: 1.408s (+/-580.86ms) 40
Test: 137.407ms (+/-510.73ms) 20
-867.18% extremem-phased/customer_preparation_p99_999 p=0.00000
Control: 1.478s (+/-613.02ms) 40
Test: 152.837ms (+/-529.23ms) 20
-593.90% extremem-phased/customer_preparation_p100 p=0.00000
Control: 1.633s (+/-500.19ms) 40
Test: 235.310ms (+/-534.69ms) 20
-402.33% extremem-phased/trigger_failure p=0.00000
Control: 27.000 (+/- 11.36 ) 40
Test: 5.375 (+/- 1.67 ) 20
-228.36% extremem-phased/customer_purchase_p99_9 p=0.00003
Control: 1.177s (+/-442.54ms) 40
Test: 358.492ms (+/-573.38ms) 20
-------------
Commit messages:
- Fix up white space and comments
- Clean up comments and remove debug instrumentation
- Move collector free to mutator free at start of update refs
- Replace ShenandoahFreeSet impl for better generality
- Revert "Improve documentation of how Evac-OOM Protocol works"
- Merge branch 'openjdk:master' into master
- Improve documentation of how Evac-OOM Protocol works
Changes: https://git.openjdk.org/jdk/pull/17561/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17561&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8324649
Stats: 983 lines in 6 files changed: 699 ins; 137 del; 147 mod
Patch: https://git.openjdk.org/jdk/pull/17561.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17561/head:pull/17561
PR: https://git.openjdk.org/jdk/pull/17561
More information about the shenandoah-dev
mailing list