The Garbage-First (G1) collector

The Garbage-First (G1) collector is a server-style garbage collector, targeted for multi-processor machines with large memories. It meets garbage collection (GC) pause time goals with a high probability, while achieving high throughput. The G1 garbage collector is fully supported in Oracle JDK 7 update 4 and later releases. The G1 collector is designed for applications that:

Can operate concurrently with applications threads like the CMS collector.
Compact free space without lengthy GC induced pause times.
Need more predictable GC pause durations.
Do not want to sacrifice a lot of throughput performance.
Do not require a much larger Java heap.

G1 is planned as the long term replacement for the Concurrent Mark-Sweep Collector (CMS). Comparing G1 with CMS, there are differences that make G1 a better solution. One difference is that G1 is a compacting collector. G1 compacts sufficiently to completely avoid the use of fine-grained free lists for allocation, and instead relies on regions. This considerably simplifies parts of the collector, and mostly eliminates potential fragmentation issues(碎片问题). Also, G1 offers more predictable garbage collection pauses than the CMS collector, and allows users to specify desired pause targets(设置预期停顿时间).

原文地址:https://www.cnblogs.com/lnas01/p/10348955.html

时间: 2024-08-28 12:13:42

The Garbage-First (G1) collector的相关文章

The The Garbage-First (G1) collector since Oracle JDK 7 update 4 and later releases

Refer to http://www.oracle.com/technetwork/tutorials/tutorials-1876574.html for detail. 一些内容复制到这儿 The G1 Garbage Collector The Garbage-First (G1) collector is a server-style garbage collector, targeted for multi-processor machines with large memories

CMS Collector and G1 Collector

Understanding the CMS Collector CMS has three basic operations: CMS collects the young generation (stopping all application threads). CMS runs a concurrent cycle to clean data out of the old generation. If necessary, CMS performs a full GC. concurren

G1 collector 介绍

背景:由于CMS算法产生空间碎片和其它一系列的问题缺陷,HotSpot提供了另外一种垃圾回收策略,G1(也就是Garbage First)算法,该算法在JDK7u4版本被正式推出,官网对此描述如下: The Garbage-First (G1) collector is a server-style garbage collector, targeted for multi-processor machines with large memories. It meets garbage coll

详解 JVM Garbage First(G1) 垃圾收集器

前言    Garbage First(G1)是垃圾收集领域的最新成果,同时也是HotSpot在JVM上力推的垃圾收集器,并赋予取代CMS的使命.如果使用Java 8/9,那么有很大可能希望对G1收集器进行评估.本文详细首先对JVM其他的垃圾收集器进行总结,并与G1进行了简单的对比:然后通过G1的内存模型.G1的活动周期,对G1的工作机制进行了介绍:同时还在介绍过程中,描述了可能需要引起注意的优化点.笔者希望通过本文,让有一定JVM基础的读者能尽快掌握G1的知识点. 第一章 概述 G1(Garb

[JVM 相关] Java 新型垃圾回收器(Garbage First,G1)

回顾传统垃圾回收器 HotSpot 垃圾收集器实现 Serial Collector(串型收集器) 使用场景,大多数服务器是单核CPU. 适用收集场景:1. 新生代收集(Young Generation Collection)2. 老年代收集(Old Generation Collection) Parallel Conllector(并行收集器) 又叫吞吐量收集器(throughput collector)应用于多核系统. 适用收集场景:1. 新生代收集是并行处理.2. 老年代收集和Seria

Java Performance Optimization Tools and Techniques for Turbocharged Apps--reference

Java Performance Optimization by: Pierre-Hugues Charbonneau reference:http://refcardz.dzone.com/refcardz/java-performance-optimization Java is among the most widely used programming languages in the software development world today. Java applications

jvm options

http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html#Options Categories of Java HotSpot VM Options Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows a

Java性能优化攻略详解

如何让Java应用程序运行是一回事,但让他们跑得快就是另外一回事了.在面对对象的环境中,性能问题就像来势凶猛的野兽.但JVM的复杂性将性能调整的复杂程度增加了一个级别.这里Refcard涵盖了JVM internals.class loading(Java8中更新以映射最新的元空间).垃圾回收.故障诊断.检测.并发性,等等. 当前Java是目前软件开发领域中使用最广泛的编程语言之一.Java应用程序在许多垂直领域(银行.电信.医疗保健等)中都有广泛使用.Refcard的目的是,帮助开发者通过专注

java虚拟机启动参数

常用参数 堆设置 -Xms :初始堆大小 -Xmx :最大堆大小 -XX:NewSize=n :设置年轻代大小 -XX:NewRatio=n :设置年轻代和年老代的比值.如:为3,表示年轻代与年老代比值为1:3,年轻代占整个年轻代年老代和的1/4 -XX:SurvivorRatio=n :年轻代中Eden区与两个Survivor区的比值.如:3,表示Eden:Survivor=3:2,一个Survivor区占整个年轻代的1/5 -XX:MaxPermSize=n :设置持久代大小 -XX:Hea