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 这将下载...
最后,JavaOne是一个知名的Java技术大会,这里提到的"javaOne-master"可能是该会议的资料或项目。它可能包含了一些课程的示例代码、讲解文档或其他学习资源,可以帮助你深入理解和实践Java编程。 总之,Java语言的...
根据给定的信息,我们可以提取并总结出以下关于JavaOne 2008的关键知识点: ### JavaOne 2008概述 JavaOne 2008是Sun Microsystems举办的一年一度的技术大会,主要聚焦于Java技术及其应用。该会议通常在旧金山的...
【JavaOne 2014】是全球最大的Java技术盛会之一,它汇聚了众多Java开发者、专家和业界领袖,共同探讨最新的Java技术和趋势。在这一年的会议中,参与者们分享了他们在开发、优化以及创新Java应用方面的经验和见解。...
JavaOne 2014 代码示例 目的 这是 Ken Sipe 提出的 junit、groovy 测试用例和 spock 的一系列比较 入门 代码是使用 gradle 提供的。 因此,在克隆存储库后,只需键入: > ./gradlew test 或者 > gradlw.bat test 这...
【JavaOne实验室】是针对Java开发者的宝贵资源,它提供了丰富的实践教程和示例代码,旨在帮助开发者深化对Java技术的理解并提升技能。这个压缩包文件`javaone-labs-master`很可能包含了历届JavaOne大会上的实践实验...
【JavaOne 2014: Spring4TW 演讲演示】 JavaOne 是全球最大的Java技术盛会之一,每年都会吸引众多Java开发者参加。在2014年的JavaOne大会上,一个引人注目的主题是"Spring4TW",这是一场关于Spring框架4.0版本的...
JavaOne会议是全球Java开发者的重要盛会,LinkedIn作为一家领先的社交媒体平台,其在技术领域的探索与实践备受关注。这篇“LinkedIn开发者JavaOne会议报告”详细揭示了LinkedIn的技术架构路线图,对于理解大规模Web...
### METRO ON JAVAONE 2009:深入解析安全使用场景 在2009年的JavaOne大会上,Sun Microsystems的两位专家Harold Carr(Metro架构师)与Jiandong Guo(Metro安全架构师)针对Metro Web Services的安全使用场景进行...
【标题】"javaOne-messenger:sd实践项目"是一个基于Java技术实现的即时通讯软件的实践项目,旨在帮助开发者理解并掌握如何构建一个简单的点对点(P2P)通信系统。这个项目主要包含了图形用户界面(GUI)、服务器...
javaone_bof7811 JavaOne 2015批注处理101的BOF7811的源该项目包含演示文稿以及该演示文稿中已降级项目的源。 演示文稿可以在[此处]找到(/ presentation / BOF7811-批注处理101.key)用法带安装的gradle ./gradle ...
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 现场没听到的, 或者没去参会的, 可以下载研究
### SCEA JavaOne认证详解 #### 标题解析:“SCEA JavaOne” - **SCEA**:Sun Certified Enterprise Architect(SUN认证企业架构师),是Sun Microsystems(太阳微系统公司)推出的针对Java技术栈的企业级架构师...
javaSE.javaOne.xmind
【标题】"Sun2008JavaOne" 指的是2008年由Sun Microsystems主办的全球知名Java开发者大会——JavaOne。这是一场汇聚了全球Java开发者、技术专家和行业领袖的重要盛会,旨在分享Java技术的最新进展、创新应用以及未来...