JavaOne: G1 Garbage Collector
The Sun Hotspot guys have been working on a new garbage collector to replace CMS called G1. This presentation went over the differences between the old CMS and the new G1 collectors and also included some perspective from a guy at the Chicago Board of Options Exchange who has been beta testing it.
CMS divides the world into the young and old generations. This is done to take advantage of the observation that the lifetime of objects is highly uneven – the vast majority of objects die young glorious deaths and a very small number of objects live for a very long time (effectively the life of the app). Also important is that there tend to be very few references from the old generation to the young generation. Because of this, it’s ok to focus our collection attention on the young gen.
In CMS, new objects are created in the young generation which is further broken up into eden and two survivor spaces. Young gen GC checks to find live objects and those are put either in a survivor space or in the old generation, depending on age. Old gen gc is mostly concurrent but does stop-the-world pauses to finish up. Also stop-the-world for reference marking. Old gen gc is fragmented and sweep finds holes and manages in free lists. There is a fallback to full stop-the-world collection and compaction.
G1 (“garbage first”) takes a different approach – all memory (except perm gen) is broken into 1 MB “regions”. Young and old are both comprised of some set of non-contiguous regions but these change over time. During young gc survivors of a region are either copied to a new young gen region or to an old gen region as appropriate.
In G1, the old generation GC there is one stop-the-world pause to mark. If any region is found to contain no live objects, the region is immediately reclaimed (this happens more frequently than you’d expect due to locality). Then compact old regions into new old region. Old gen collections are piggybacked on young gen collections.
The technique for how G1 manages references into a region is called “remembered sets”. Every region has a small data structure (<5% of total heap) that reduces work needed to do marking. The remembered sets contain all external references into that region (references within the region are not included).
After this initial layour by Tony Printezis (who was entertaining and explained things well), Paul Ciciora talked about how they test things at CBOE. Probably most important Paul said it is still a work in progress and not production-ready yet.
One interesting item from the Q&A was that this will definitely be in Java SE 7 (probably committed in next few weeks) and that it will also be released in Java 6 update as well.
相关推荐
JavaOne 代码示例 目的 这是 Ken Sipe 提出的 junit、groovy 测试用例和 spock 的一系列比较 入门 代码是使用 gradle 提供的。 因此,在克隆存储库后,只需键入: > ./gradlew test 或者 > gradlw.bat test 这将下载...
java一 我参加哈佛计算机科学课程的工作,介绍Java。 本文中的工作没有提出程序的提示,但是如果您有任何疑问,我建议您与我们联系。
JavaOne 2008JavaOne 2008JavaOne 2008JavaOne 2008JavaOne 2008JavaOne 2008
JavaOne2014报告会上的介绍。
JavaOne 2014 代码示例 目的 这是 Ken Sipe 提出的 junit、groovy 测试用例和 spock 的一系列比较 入门 代码是使用 gradle 提供的。 因此,在克隆存储库后,只需键入: > ./gradlew test 或者 > gradlw.bat test 这...
javaone-labs JavaOne实验室
linkedin开发者javaone会议报告,阐述了linkedin架构路线图,对于大型WEB站点开发很有参考价值。
javaone-2014 JavaOne 2014 Spring4TW 演讲演示
JavaOne2009大会资料-Core Technology: Java EE
responsive-primefaces-javaone-2016:我们在JavaOne San Francisco 2016上的会议的源代码。(葡萄牙语
JavaOne2009大会资料-Core Technology: Java EE
javaone_bof7811 JavaOne 2015批注处理101的BOF7811的源该项目包含演示文稿以及该演示文稿中已降级项目的源。 演示文稿可以在[此处]找到(/ presentation / BOF7811-批注处理101.key)用法带安装的gradle ./gradle ...
METRO PRESENTATION ON JAVAONE 2009
JavaOne 2015:云一 JavaOne 2015演示文稿的示例项目-“其他会话”。 主要目标是详细说明云解决方案中基于REST的集成模式。 介绍 该项目代表简化云解决方案的仿真。 云架构面向基于JAX-RS的微服务。 想法是,每个...
JavaOne2009大会资料-Services: Web 2.0, Next Generation Web, and Cloud Services Platform 现场没听到的, 或者没去参会的, 可以下载研究
JavaOne2009大会资料-Services: Web 2.0, Next Generation Web, and Cloud Services Platform 现场没听到的, 或者没去参会的, 可以下载研究
javaOne-Messenger sd实践项目 步骤: 1 - 图形界面 2 - 服务器客户端列表 3 - 客户端 - 服务器 (P2P)
内容摘要 Creating Games on the Java™ Platform with the jMonkeyEngine Our Goal: To get you started on the path to creating professional quality 3D games and applications in Java™ technology today!
JavaOne2009大会资料-Core Technology: Embedded / Real-Time / Java Card