RFR(S): JDK-8048150: Allow easy configurations for large CDS archives

Ioi Lam ioi.lam at oracle.com
Wed Jul 30 22:46:29 UTC 2014


On 7/30/14, 11:13 AM, Christian Thalinger wrote:
>
> On Jul 30, 2014, at 10:41 AM, Ioi Lam <ioi.lam at oracle.com 
> <mailto:ioi.lam at oracle.com>> wrote:
>
>>
>> On 7/30/14, 9:31 AM, Christian Thalinger wrote:
>>> On Jul 29, 2014, at 4:08 PM, Calvin Cheung <calvin.cheung at oracle.com 
>>> <mailto:calvin.cheung at oracle.com>> wrote:
>>>
>>>> In JDK8, if one wants to create a large CDS archive (with a lot of 
>>>> classes), one needs to add VM options like these
>>>>
>>>> -XX:SharedReadWriteSize=200000000
>>>> -XX:SharedReadOnlySize=200000000
>>>> -XX:SharedMiscDataSize=22000000
>>>> -XX:SharedMiscCodeSize=10000000
>>>>
>>>> which is cumbersome and error-prone.
>>>>
>>>> This change is to add the following 2 higher-level options to 
>>>> configure the sizes of the 4 regions (ro, rw, md, mc) of a shared 
>>>> archive.
>>>>
>>>> -XX:+UseLargeSharedArchive (allow up to 300MB combined archive size)
>>>> -XX:+UseHugeSharedArchive  (allow up to 800MB combined archive size)
>>> Can we have only one new product flag instead of two?
>> Christian,
>>
>> Do you have any suggestion about what the single flag would look like?
>
> Something like:  -XX:SharedArchiveSize={large,huge}
>
(oops, I replied to the wrong Christian :-)

But that means we need to write a special parser for the 
SharedArchiveSize flag, and check for error cases, etc. I think it's 
better to reply on the built-in parser inside arguments.cpp.

- Ioi

>>
>> Thanks
>> - Ioi
>>
>>>> I tried a scenario with 19854 classes in the archive, the 
>>>> percentage of usage of the 4 regions are:
>>>> ro (40%), rw (55%), md (3%), mc (2%)
>>>>
>>>> ro space:  57948760 [ 40.6% of total] out of 134217728 bytes [43.2% 
>>>> used] at 0x0000000800000000
>>>> rw space:  80259048 [ 56.2% of total] out of 134217728 bytes [59.8% 
>>>> used] at 0x0000000808000000
>>>> md space:   4102376 [  2.9% of total] out of  23068672 bytes [17.8% 
>>>> used] at 0x0000000810000000
>>>> mc space:    426525 [  0.3% of total] out of  23068672 bytes [ 1.8% 
>>>> used] at 0x0000000811600000
>>>> total   : 142736709 [100.0% of total] out of 314572800 bytes [45.4% 
>>>> used]
>>>>
>>>> The usage distribution also holds for a simpler scenario with 2467 
>>>> classes.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8048150
>>>>
>>>> webrev: http://cr.openjdk.java.net/~ccheung/8048150/webrev/ 
>>>> <http://cr.openjdk.java.net/%7Eccheung/8048150/webrev/>
>>>>
>>>> Test:
>>>>    JPRT
>>>>
>>>> thanks,
>>>> Calvin
>



More information about the hotspot-runtime-dev mailing list