-XX:-CMSClassUnloadingEnabled

Mikael Gerdin mikael.gerdin at oracle.com
Fri Mar 11 18:32:34 UTC 2016



On 2016-03-11 18:29, Jon Masamitsu wrote:
>
>
> On 3/11/2016 8:12 AM, Tony Printezis wrote:
>> Thanks for the heads up Jungwoo. I think it should be straightforward
>> to decide whether to unload classes for a particular CMS cycle based
>> on the rate at which the meatspace occupancy is growing. Has anyone
>> considered / looked into this?
>
> No one has looked at this to my knowledge.

Another, perhaps simpler, alternative would be to enable class unloading 
for a single CMS cycle at
   if (MetaspaceGC::should_concurrent_collect()) {
     log_trace(gc)("CMSCollector: collect for metadata allocation ");
     return true;
   }

This would cause metaspace allocation triggered CMS cycles to unload 
classes at least.

/Mikael

>
> Jon
>
>>
>> Tony
>>
>> On March 10, 2016 at 7:07:00 PM, Jungwoo Ha (jwha at google.com
>> <mailto:jwha at google.com>) wrote:
>>
>>> We've been disabled CMSClassUnloading for a long time and had no issues.
>>> We recently turned it back on by default with
>>> CMSClassUnloadingMaxInterval=5, which amortizes the increased remark
>>> cost.
>>>
>>>
>>> On Thu, Mar 10, 2016 at 1:32 PM, Tony Printezis
>>> <<mailto:tprintezis at twitter.com>tprintezis at twitter.com> wrote:
>>>
>>>     Hi all,
>>>
>>>     CMSClassUnloadingEnabled is enabled by default in JDK 8. Most of
>>>     our services do not require class unloading (they load a bunch of
>>>     classes up-front and that’s it) so we’re thinking of turning it
>>>     off by default in our JDK as it increases our remark times by a
>>>     non-trivial amount (40-90ms depending on the service). Any known
>>>     issues with running with -XX:-CMSClassUnloadingEnabled? (This is
>>>     a veiled way to ask: is anyone testing with that flag off?)
>>>
>>>     Thanks,
>>>
>>>     Tony
>>>
>>>     -----
>>>
>>>     Tony Printezis | JVM/GC Engineer / VM Team | Twitter
>>>
>>>     @TonyPrintezis
>>>     tprintezis at twitter.com <mailto:tprintezis at twitter.com>
>>>
>>>
>>>
>>>
>>> --
>>> Jungwoo Ha | Java Platform Team | jwha at google.com
>>> <mailto:jwha at google.com>
>>>
>> -----
>>
>> Tony Printezis | JVM/GC Engineer / VM Team | Twitter
>>
>> @TonyPrintezis
>> tprintezis at twitter.com <mailto:tprintezis at twitter.com>
>>
>



More information about the hotspot-gc-dev mailing list