Sun JVM 年轻代和老年代垃圾回收都需要暂停JVM
2016-07-28 22:20
246 查看
The Young Generation is where all new objects are allocated and aged. When the young generation fills up, this causes a minor garbage collection. Minor collections can be optimized assuming a high object mortality
rate. A young generation full of dead objects is collected very quickly. Some surviving objects are aged and eventually move to the old generation.
--所有新的对象都会在年轻代中创建和标记年纪。当年轻代被填满,会引起minor garbage collection。它可以回收大部分垃圾,而且是非常快的收集,有些已经达到年纪的会被移动到老年代。
Stop the World Event - All minor garbage collections are "Stop the World" events. This means that all application threads are stopped until the operation completes. Minor garbage collections are always Stop the World events.
--所有的minor garbage collection是stop the world事件。这意味着所有的应用线程要停止直到收集操作完成。
The Old Generation is used to store long surviving objects. Typically, a threshold is set for young generation object and when that age is met, the object gets moved to the old generation. Eventually the old generation needs to be collected.
This event is called a major garbage collection.
--老年代通常存储生命周期长的对象,通常是年轻代对象的年纪到了(在Hot spot 中默认设置是15),就会将对象移动到老年代。回收老年代的事件叫major garbage。
Major garbage collection are also Stop the World events. Often a major collection is much slower because it involves all live objects. So for Responsive applications, major garbage collections should be minimized. Also note, that the length of the Stop the
World event for a major garbage collection is affected by the kind of garbage collector that is used for the old generation space.
--major garbage collection也是stop the world的事件,通常major collection非常慢,因为涉及到所有活的对象。所以对于应用的响应,major garbage collections应该少一点好。也要注意的是,对老年代的回收的major garbage collection是最长的一种垃圾回收机制。
在正式环境下,我所负责的系统
minor garbage collection 0.05s-0.17s之间
major garbage collection 1.2s-5.3s之间
The Permanent generation contains metadata required by the JVM to describe the classes and methods used in the application. The permanent generation is populated by the JVM at runtime based on classes in use by the application. In addition,
Java SE library classes and methods may be stored here.
Classes may get collected (unloaded) if the JVM finds they are no longer needed and space may be needed for other classes. The permanent generation is included in a full garbage collection.
--永久代装的是JVM所需要的元数据,应用的类和方法。永久代是应用运行的基础。此外,java SE的lib也运行在里面。当类不被需要时,就会被回收,被full garbage回收。
rate. A young generation full of dead objects is collected very quickly. Some surviving objects are aged and eventually move to the old generation.
--所有新的对象都会在年轻代中创建和标记年纪。当年轻代被填满,会引起minor garbage collection。它可以回收大部分垃圾,而且是非常快的收集,有些已经达到年纪的会被移动到老年代。
Stop the World Event - All minor garbage collections are "Stop the World" events. This means that all application threads are stopped until the operation completes. Minor garbage collections are always Stop the World events.
--所有的minor garbage collection是stop the world事件。这意味着所有的应用线程要停止直到收集操作完成。
The Old Generation is used to store long surviving objects. Typically, a threshold is set for young generation object and when that age is met, the object gets moved to the old generation. Eventually the old generation needs to be collected.
This event is called a major garbage collection.
--老年代通常存储生命周期长的对象,通常是年轻代对象的年纪到了(在Hot spot 中默认设置是15),就会将对象移动到老年代。回收老年代的事件叫major garbage。
Major garbage collection are also Stop the World events. Often a major collection is much slower because it involves all live objects. So for Responsive applications, major garbage collections should be minimized. Also note, that the length of the Stop the
World event for a major garbage collection is affected by the kind of garbage collector that is used for the old generation space.
--major garbage collection也是stop the world的事件,通常major collection非常慢,因为涉及到所有活的对象。所以对于应用的响应,major garbage collections应该少一点好。也要注意的是,对老年代的回收的major garbage collection是最长的一种垃圾回收机制。
在正式环境下,我所负责的系统
minor garbage collection 0.05s-0.17s之间
major garbage collection 1.2s-5.3s之间
The Permanent generation contains metadata required by the JVM to describe the classes and methods used in the application. The permanent generation is populated by the JVM at runtime based on classes in use by the application. In addition,
Java SE library classes and methods may be stored here.
Classes may get collected (unloaded) if the JVM finds they are no longer needed and space may be needed for other classes. The permanent generation is included in a full garbage collection.
--永久代装的是JVM所需要的元数据,应用的类和方法。永久代是应用运行的基础。此外,java SE的lib也运行在里面。当类不被需要时,就会被回收,被full garbage回收。
相关文章推荐
- SQL数据库
- 中间人攻击破解HTTPS传输内容
- 63. Unique Paths II
- Linux目录结构和常用命令
- 求全排列
- 如何使用CSDN-markdown编辑器
- 《新媒体的黄金时代》:三篇媒体人的演讲稿,主题是关于传统媒体与新媒体的思考。三星
- 死锁的产生以及处理
- leetcode Design Tic-Tac-Toe
- 全平台自动化测试软件的未来王者--上帝之眼( Sikuli )的简介与安装
- 2016 Multi-University Training Contest 4 欢乐战记
- 嵌入式学习-驱动开发-lesson2-LED字符设备驱动
- Bringing up interface Auto_eth3: Error: Connection activation failed: Device not managed by Network
- Protocol Buffers v3.0.0编译安装小记
- lucene性能优化
- Removing obsolete files from server... Could not clean server of obsolete files: Premature end of fi
- 处理方法中的数据绑定
- Android 四大图片缓存原理,特性对比
- 使用GAMS的gdxxrw命令读写Excel时Cdim和Rdim的意义及设置
- 自定义滑动开关控件的实现与使用