Eden space is not empty after a Full GC?
Jon Masamitsu
Jon.Masamitsu at Sun.COM
Mon May 14 17:25:53 UTC 2007
Yes, it's almost random in terms of which objects get
left in the young generation. It is a sliding compaction
so objects at the higher end of the generation are
more likely to be left behind.
Leaving objects in the young generation probably
means that the following collection will also have to
be a full collection. It's generally better to have some
room in the old (mature) generation so that minor
collections can be done so I would say it would be
better to have additional space in the old generations.
Neo Jia wrote:
> On 5/14/07, Jon Masamitsu <Jon.Masamitsu at sun.com> wrote:
>
>> A perhaps more general case (i.e., no necessarily involving large
>> objects)
>> is one where all the live data does not fit into the old generation.
>> A full
>> collection will attempt to compact the young generation into the old
>> generation. If the old generation becomes full during the compaction,
>> the remaining live data in the young generation will be compacted
>> into the young generation.
>
>
> Jon,
>
> Thanks. I assume that which objects will be left in the nursery space
> is pretty random not based on the ages. Will it improve the
> performance if we intend to leave those younger objects in nursery?
> Or, just enlarging the mature space to fit in those young objects? But
> the
> reserved space is almost fully committed.
>
> Thanks,
> Neo
>
>>
>> Neo Jia wrote:
>>
>> > On 5/14/07, Y Srinivas Ramakrishna <Y.S.Ramakrishna at sun.com> wrote:
>> >
>> >>
>> >>
>> >> Neo Jia wrote On 05/14/07 09:00 AM,:
>> >>
>> >> > hi,
>> >> >
>> >> > I just found that for the generational mark-sweep garbage
>> collector,
>> >> > after a full GC, the eden space may not be empty.
>> >>
>> >> That would usually be the case because of bin-packing
>> >> issues with the sliding compaction that might prevent a large
>> >> object in Eden from being "slid" into the available space
>> >> in old gen or in the survivor space. It'll usually be the case
>> >> then that your are running with memory quite tight (or
>> >> with a huge Eden and very large objects).
>> >
>> >
>> > Could you point me to the code where the full GC found it cannot slide
>> > this huge chunk?
>> >
>> > Thanks,
>> > Neo
>> >
>> >>
>> >> Are there other situations where you see a non-empty Eden
>> >> following a mark-compact full collection?
>> >>
>> >> >
>> >> > Is there any implementation concern for this? Can I force the
>> full GC
>> >> > to clean the eden space?
>> >>
>> >>
>> >> A full gc would do a mark-compact collection.
>> >>
>> >> -- ramki.
>> >>
>> >> >
>> >> > Thanks,
>> >> > Neo
>> >>
>> >>
>> >> --
>> >>
>> >>
>> ----------------------------------------------------------------------------
>>
>> >>
>> >> Y. Srinivas Ramakrishna HotSpot JVM
>> >> Sun Microsystems, Inc., USCA 22-123 CSG / Sun Software
>> >> 4220 Network Circle 408 276 7250 (x17250)
>> >> Santa Clara, CA 95054, U.S.A. Y dot S dot Ramakrishna at Sun
>> >> dot COM
>> >>
>> ----------------------------------------------------------------------------
>>
>> >>
>> >> ----------------- Sun Proprietary / Confidential
>> >> ---------------------------
>> >>
>> >>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> >>
>> >>
>> >> NOTICE: This email message is for the sole use of the intended
>> >> recipient(s)
>> >> and may contain confidential and privileged information. Any
>> >> unauthorized
>> >> review, use, disclosure or distribution is prohibited. If you are not
>> >> the
>> >> intended recipient, please contact the sender by reply email and
>> destroy
>> >> all copies of the original message.
>> >>
>> >>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> >>
>> >>
>> >>
>> >
>> >
>>
>
>
More information about the hotspot-gc-dev
mailing list