Java - available garbage collection algorithms [cl

2019-01-31 09:12发布

Does anyone know a proper resource to read on the available garbage collection mechanisms in java? So far I found a couple of websites but they did not contain a comprehensive description with respect to when to use which and what the implementation was. (I am referring to Oracle's jdk)

2条回答
我命由我不由天
2楼-- · 2019-01-31 09:50

Check out this website www.cubrid.org/blog/tags/Garbage%20Collection/. It has a suite of five articles describing gc from concept to details and use cases.
I guess you are probably looking at this one in particular.

查看更多
虎瘦雄心在
3楼-- · 2019-01-31 10:01

As of today, there are 4 GC algorithms available in the Java Hotspot VM:

  • The Serial GC - recommended for client-style applications that do not have low pause time requirements.
  • The Parallel GC - use when the throughput matters.
  • The Mostly-Concurrent GC (also known as Concurrent Mark-Sweep GC(CMS)) - use when the latency matters.
  • The Garbage First GC (G1) - new GC algorithm, for CMS replacement.

You can find more information about these GC algorithms in the references below.

Books:

  • Java Performance - practical guide, contains chapters on GC, explains comprehensively when and how to use various Hotspot GC algorithms,
  • The Garbage Collection Handbook - Garbage-Collection theory explained, mentions all available GC techniques.

Talks/Articles:

Mailing List:

查看更多
登录 后发表回答