FullGC and Major GC区别

本文深入探讨了Minor GC、Major GC及Full GC的区别,重点分析GC是否暂停所有应用线程或能否与应用并发执行。文章建议关注GC对应用延迟与吞吐量的影响,并监测特定GC事件是否强制停止所有应用线程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  • Major GC is cleaning the Tenured space.
  • Full GC is cleaning the entire Heap – both Young and Tenured spaces.

This leads us to the point where instead of worrying whether the GC is called Major or Full GC, you should focus to finding out whether the GC at hand stopped all the application threads or was it able to progress concurrently with the application threads.

         区分GC什么时候是Full gc 什么时候是major gc,可以通过看gc的时候是否暂停了全部的应用程序的线程,或者gc能否和应用程序并发执行

Unfortunately it is a bit more complex and confusing. To start with – many Major GCs are triggered by Minor GCs, so separating the two is impossible in many cases. On the other hand – many modern garbage collections perform cleaning the Tenured space partially, so again, using the term “cleaning” is only partially correct.

This leads us to the point where instead of worrying whether the GC is called Major or Full GC, you should focus to finding out whether the GC at hand stopped all the application threads or was it able to progress concurrently with the application threads.

 

结论:

Considering the situation, it is best to even avoid thinking in terms of Minor, Major or Full GC. Instead, monitor your application for latency or throughput and link the GC events to the results. Along with these events, you need to have the information whether the particular GC event forced all the application threads to stop or was part of the event handled concurrently.

If you enjoyed the content – this is the example chapter from our Garbage Collection Handbook, which is now available.

 

https://plumbr.io/blog/garbage-collection/minor-gc-vs-major-gc-vs-full-gc

https://sulangsss.github.io/2018/12/22/Java/JVM/Basic/Minor%20GC%20vs%20Major%20GC%20vs%20Full%20GC/

https://plumbr.io/java-garbage-collection-handbook

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值