不知道是不是越老越不顶用了。。发现sun上面的两篇英文文档已经很难看懂了。。。 有兴趣的见文章最底部的介绍和链接
一。Maximum pause time
goal 基于程序运行时,垃圾回收需要对程序暂停最大时间的控制
-XX:MaxGCPauseMillis=<nnn>
This is interpreted as a hint to the
garbage collector that pause times of <nnn> milliseconds or
less are desired. The garbage collector will adjust the Java heap
size and other garbage collection related parameters in an attempt to
keep garbage collection pauses shorter than <nnn> milliseconds.
By default there is no maximum pause time goal.
These adjustments
may cause the garbage collector to occur more frequently
, reducing
the overall throughput
of the application. In some cases the desired
pause time goal cannot be met.
对于实时性比较高的系统往往不希望程序暂停在垃圾回收上。 另外这个策略看起来也可以加大回收次数频率。
二。throughput goal 基于程序吞吐量的垃圾回收策略控制
-XX:GCTimeRatio=<nnn>
Throughput
is the percentage of total time not spent in
garbage collection, considered over long periods of time. 这个吞吐量的意思就是在一段时间内,花费在非垃圾回收的时间上比例。
The ratio of garbage collection time to
application time is
1 / (1 + <nnn>)
For example -XX:GCTimeRatio=19 sets a
goal of 1/20th
or 5% of the total time for garbage
collection.
The time spent in garbage collection is
the total time for both the young generation and old generation
collections combined. If the throughput goal is not being met, the
sizes of the generations are increased in an effort to increase the
time the application can run between collections.
这个策略对整个系统的吞吐量应该能有一个提升。特别是在硬件资源足够的情况下。
p.s. 原文链接
==============================
第一个是介绍垃圾回收的原理
Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machine
The young generation consists of eden plus two survivor spaces . Objects are initially
allocated in eden.One survivor space is empty at any time, and serves as a
destination of the next,copying collection of any live objects in eden and the other
survivor space.
Objects are copied between survivor spaces in this way until they are old enough
to be tenured, or copied to the tenured generation.
第二个比较细节的介绍了jvm在不同机器上的表现机制,比如
Ergonomics in the 5.0 JavaTM Virtual Machine
In the J2SE platform version 5.0 a class of machine referred to as a server-class machine has been defined as a machine with
*
2 or more physical processors
*
2 or more Gbytes of physical memory
On server-class machines by default the following are selected.
*
Throughput garbage collector
*
Heap sizes
*
initial heap size of 1/64 of physical memory up to 1Gbyte
*
maximum heap size of ¼ of physical memory up to 1Gbyte
*
Server runtime compiler
Java HotSpot VM Options 参数汇总
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
分享到:
相关推荐
JVM内存回收最全的手册书籍,详细介绍了各种内存回收算法,是Java程序员进阶的必备书籍
主要是JVM内存分配及简单的JVM性能调优
jvm内存模型,jvm脑图,jvm调优,jvm垃圾回收算法,jvm垃圾回收器,逃逸算法等总结。
JVM历史发展和内存回收笔记
gc即垃圾收集机制是指jvm用于释放那些不再使用的对象所占用的内存。java语言并不要求jvm有gc,也没有规定gc如何工作。不过常用的jvm都有gc,而且大多数gc都使用类似的算法管理内存和执行收集操作。
你对JVM内存组成结构和JVM垃圾回收机制是否熟悉,这里和大家简单分享一下,希望对你的学习有所帮助,首先来看一下JVM内存结构,它是由堆、栈、本地方法栈、方法区等部分组成,结构图如下所示。
HotSpot的垃圾回收机制采用...JVM内存回收只要是针对这3个区域来说的。像NIO的直接文件内存读取,使用的是直接内存,只有出发了FullGC方能回收该区域!JNI调用本地库,本地代码所消耗的内存需要操作系统额外开辟内存。
(二)MATJVM 内存分析工具.MAT JVM 内存分析工具.MAT JVM 内存分析工具.(二)MATJVM 内存分析工具.MAT JVM 内存分析工具.MAT JVM 内存分析工具.
jvm内存反洗工具:
JVM 内存管理之道 JVM垃圾回收机制 JVM GC组合 JVM 内存监控工具
第二节:JVM内存模型 1.1 概念 1.2 JVM内存模型 1.3 Heap堆内存模型 第三节:定位垃圾对象的依据 1.1 引用计数法 1.2 可达性算法 第四节:垃圾回收算法 1.1标记清除算法 1.2复制算法 1.3 标记整理(标记压缩)...
认识JVM内存优化, 避免最大的误区:认为JVM内存越大越好。看到一个线程 blocked就认为阻塞了。
idea插件JVM内存工具JProfiler11,下载完,即可导入idea,可idea快捷打开使用。
JVM内存管理和垃圾回收 JVM内存管理和垃圾回收 JVM内存管理和垃圾回收
jvm内存模型以及垃圾回收机制.pptx
前段时间做JVM调优网上搜集的一些资料,里面有图形化讲解JVM内存使用和各个参数详细介绍等
个人整理 jvm相关知识 包括内存分配机制 垃圾回收机制 垃圾收集器相关 及 垃圾收集算法
JVM垃圾回收器和内存分配策略
该文档描述了开发测试环境中Docker及JVM内存限制部署方案
自己总结的jvm中内存和垃圾回收的笔记,绘制了详细的思维导图,每个思维导图中均有详细的博文解释,方便大家学习和理解,免费分享给大家。适合jvm的爱好者和学习者