Sun JVM 年轻代和老年代垃圾回收都需要暂停JVM
2016-05-09 09:58
375 查看
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回收。
http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html
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回收。
http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html
相关文章推荐
- 导航菜单滑动效果+解决两个js的执行顺序问题
- springMVC两种方式实现多文件上传及效率比较
- 查看LINUX进程内存占用情况
- git操作
- 中间人攻击实验 https
- CRM开发要点(三)
- 看看 SDWebImage内部基本实现过程
- Spring+Mybatis+jQuery.Pagination.js异步分页及JsonConfig的使用
- linux下查看和修改环境变量path
- php文件操作小结(删除指定文件/获取文件夹下的文件名/读取文件夹下图片名)
- Dream_Spark-----Spark 定制版:003~Spark Streaming(三)
- C++中的关键字剖析(整理)
- 获取App Store 信息
- Dream_Spark-----Spark 定制版:004~Spark Streaming事务处理彻底掌握
- 项目管理的思考
- gcd理解学习
- lucene5.5 自定义分词器跟过滤器需要注意的
- Linux container_of()
- mac系统移除openfire
- C#/winform控件命名规范