RFR: 8337828: CDS: Trim down minimum GC region alignment [v2]
Aleksey Shipilev
shade at openjdk.org
Mon Aug 19 09:17:50 UTC 2024
On Thu, 15 Aug 2024 21:34:19 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> CDS currently follows G1's minimum region size to guess which alignment to use when dumping the heap. The comment near the constant rightfully recognizes it would be convenient for Shenandoah to trim the alignment down to 256K (Shenandoah's min region size). If we do this, we will improve the heap sizes [JDK-8293650](https://bugs.openjdk.org/browse/JDK-8293650) can operate at.
>>
>> Unless I am missing something else, trimming down the min region alignment has impact on the size of the objects we can store in CDS archive. Conveniently, `-Xlog:cds+heap` prints the object size stats for us, and it looks we are way under the 256K limit:
>>
>>
>> $ build/macosx-aarch64-server-fastdebug/images/jdk/bin/java -XX:-UseCompressedOops -Xshare:dump -Xlog:cds+heap
>> ...
>> [0.921s][info][cds,heap] 0 objects are <= 8 bytes (total 0 bytes, avg 0.0 bytes)
>> [0.921s][info][cds,heap] 2550 objects are <= 16 bytes (total 40800 bytes, avg 16.0 bytes)
>> [0.921s][info][cds,heap] 14325 objects are <= 32 bytes (total 431896 bytes, avg 30.1 bytes)
>> [0.921s][info][cds,heap] 6572 objects are <= 64 bytes (total 301304 bytes, avg 45.8 bytes)
>> [0.921s][info][cds,heap] 1225 objects are <= 128 bytes (total 113112 bytes, avg 92.3 bytes)
>> [0.921s][info][cds,heap] 2173 objects are <= 256 bytes (total 384024 bytes, avg 176.7 bytes)
>> [0.921s][info][cds,heap] 143 objects are <= 512 bytes (total 47720 bytes, avg 333.7 bytes)
>> [0.921s][info][cds,heap] 40 objects are <= 1024 bytes (total 26872 bytes, avg 671.8 bytes)
>> [0.921s][info][cds,heap] 19 objects are <= 2048 bytes (total 29656 bytes, avg 1560.8 bytes)
>> [0.921s][info][cds,heap] 9 objects are <= 4096 bytes (total 20744 bytes, avg 2304.9 bytes)
>> [0.921s][info][cds,heap] 4 objects are <= 8192 bytes (total 20536 bytes, avg 5134.0 bytes)
>> [0.921s][info][cds,heap] 3 objects are <= 16384 bytes (total 30168 bytes, avg 10056.0 bytes)
>> [0.921s][info][cds,heap] 2 objects are <= 32768 bytes (total 32800 bytes, avg 16400.0 bytes)
>> [0.921s][info][cds,heap] 0 objects are <= 65536 bytes (total 0 bytes, avg 0.0 bytes)
>> [0.921s][info][cds,heap] 1 objects are <= 131072 bytes (total 66848 bytes, avg 66848.0 bytes)
>> [0.921s][info][cds,heap] 0 objects are <= 262144 bytes (total 0 bytes, avg 0.0 bytes)
>> [0.921s][info][cds...
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>
> - Merge branch 'master' into JDK-8337828-cds-min-alignment
> - Work
Need a re-review after merge :) Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20469#issuecomment-2296075672
More information about the hotspot-runtime-dev
mailing list