concurrent mode failure during concurrent sweep phase
Jon Masamitsu
jon.masamitsu at oracle.com
Wed Aug 15 21:20:18 UTC 2012
Kirk,
You're probably right about the sweep not completing.
A CMS sweep walks over the old gen looking for dead objects
and adds them to the free lists as they are found. That newly
added space is available for allocation as soon as it is on
the free lists.
Jon
On 8/15/2012 7:57 AM, Kirk Pepperdine wrote:
> Hi Jon,
>
> Thanks for the response, I don't believe the sweep has completed as that phase is pre-empted by the concurrent mode failure. If the promotion fails outside of a CMS phase then it seems to go directly to a Full GC without registering a CMF.
>
> I guess one of the assumptions that I was under was that any newly freed space wouldn't be visible until after the CMS-reset.
>
> Regards,
> Kirk
>
> On 2012-08-15, at 4:46 PM, Jon Masamitsu<jon.masamitsu at oracle.com> wrote:
>
>> Kirk,
>>
>> In this case the sweep has completed, right? So no additional free space is
>> going to be found. Even if we delayed the young gen collection, it would still
>> fail.
>>
>> In general there is a way to get CMS to hold off the young gen collection
>> by completing the concurrent collection in a STW phase. I can't swear
>> that it still works but the idea was that if we were sweeping (I think), we should
>> move the collection from a concurrent collection to a STW collection
>> and finish the sweep during a STW. I've only seen it worsen the
>> situation (i.e., the sweeping is so slow that it is much faster to do the
>> full collection). I think that code should be ripped out.
>>
>> Jon
>>
>>
>> On 8/15/2012 5:01 AM, Kirk Pepperdine wrote:
>>> Hi all,
>>>
>>> : 81092K->81092K(81856K), 0.3419045 secs]5274.145: [CMS5281.056: [CMS-concurrent-sweep: 11.066/12.602 secs]
>>>
>>> In all of the GC logs I've got, this one doesn't show up very often. Now that I'm looking at it I'm asking myself... does it really make sense to declare a CMF when one is so close to the end of the CMS cycle? This really literally just small numbers of instructions away from the CMS-reset.... Wouldn't it make more sense to delay the ParNew that is hoisting survivors into CMS tenured vs triggering a full gc with it's (most likely longer) STW pause? Or is this a signal that the failure is most likely due to high fragmentation?
>>>
>>> Regards,
>>> Kirk
More information about the hotspot-gc-dev
mailing list