1.JVM垃圾回收器

- 单线程回收器
Serial
Serial Old - 多线程回收器(吞吐量优先)
Parallel Scavenge
Parallel Old
垃圾回收会伴随对堆空间扩容或缩容

GC 导致业务线程暂停 stop the world
STW 的时间减少
-
并发垃圾回收器( 响应优先)
CMS垃圾回收 Concurrent Mark Sweep
专门单独针对老年代的垃圾回收
CMS并发垃圾回收
CMS的细节
预清理
并发可中断预清理
2.JVM调优
1.堆空间设置
2.扩容新生代提高GC效率
3.JVM是如何避免Minor GC时扫描全堆的? card table(卡表)
跨代引用
3.常量池
- class常量池(静态常量池)
- 运行时常量池
- 字符串常量池

网友评论