2012年5月30日 星期三

Garbage Collehttp://www.blogger.com/blogger.g?blogID=5091259175692372980#editor/target=post;postID=7559320302580085586ction (2)

Let me introduce some of the key words before going to Java practical GC tuning skills:


1. Stop-the-world
It simply halt the program and trace the garbage using Tracing Collectors.

2. Incremental
Incremental GC is designed to reduce this halting time of 'Stop-the-world'. It separates the GC cycle in discrete phases.

3. Concurrent
Concurrent GC does not the program execution at all.


4 .Compacting -
 After discarding the non-reachable objects,it may copy some or all of the reachable objects into a new area of memory.

5. Non-compacting -Moving may seems inefficient, so there is another approach. It does not copy the objects to the new area of memory.

6. Generational GC- It divides the object into generations. In Java, it divides the heap space into 5 area, namely eden, survivor, survivor2 , tenured and permanent area.
At first, objects are allocated to Eden and Survivor 1 and 2 would collect objects on each of the minor GC. If they survive in the survivor 1 or 2 long enough, these objects are copied to  Tenured area.


(Not Done)



Reference from:
http://blog.griddynamics.com/2011/06/understanding-gc-pauses-in-jvm-hotspots.html
(This is really a good page learning the mathematics of GC)

沒有留言:

張貼留言