Skip to content

Commit

Permalink
默认值为
Browse files Browse the repository at this point in the history
  • Loading branch information
renfufei committed Dec 9, 2014
1 parent 450d6cc commit 79717dc
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions tiemao_2014/G1/G1.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,14 @@ The G1 collector performs the following phases on the old generation of the heap
<table>

<tr>
<th>Phase
<th>阶段
</th>
<th>Description
<th>说明
</th>
</tr/>

<tr>
<td>(1) Initial Mark
<td>(1) 初始标记(Initial Mark)
</td>
<td>
(Stop the World Event) This is a stop the world event. With G1, it is piggybacked on a normal young GC. Mark survivor regions (root regions) which may have references to objects in old generation.
Expand All @@ -389,23 +389,23 @@ The G1 collector performs the following phases on the old generation of the heap

<tr>
<td>
(2) Root Region Scanning
(2) 根区域扫描(Root Region Scanning)
</td>
<td> Scan survivor regions for references into the old generation. This happens while the application continues to run. The phase must be completed before a young GC can occur.
</td>
</tr/>

<tr>
<td>
(3) Concurrent Marking
(3) 并发标记(Concurrent Marking)
</td>
<td> Find live objects over the entire heap. This happens while the application is running. This phase can be interrupted by young generation garbage collections.
</td>
</tr/>

<tr>
<td>
(4) Remark
(4) 再次标记(Remark)
</td>
<td>
(Stop the World Event) Completes the marking of live object in the heap. Uses an algorithm called snapshot-at-the-beginning (SATB) which is much faster than what was used in the CMS collector.
Expand All @@ -414,7 +414,7 @@ The G1 collector performs the following phases on the old generation of the heap

<tr>
<td>
(5) Cleanup
(5) 清理(Cleanup)
</td>
<td>
(Stop the World Event and Concurrent)
Expand All @@ -426,7 +426,7 @@ Reset the empty regions and return them to the free list. (Concurrent)

<tr>
<td>
(*) Copying
(*) 拷贝(Copying)
</td>
<td>
(Stop the World Event) These are the stop the world pauses to evacuate or copy live objects to new unused regions. This can be done with young generation regions which are logged as [GC pause (young)]. Or both young and old generation regions which are logged as [GC Pause (mixed)].
Expand Down Expand Up @@ -503,9 +503,9 @@ Here is a sample command line for starting the Java2Demo included in the JDK dem

**-XX:+UseG1GC** - Tells the JVM to use the G1 Garbage collector.

**-XX:MaxGCPauseMillis=200** - Sets a target for the maximum GC pause time. This is a soft goal, and the JVM will make its best effort to achieve it. Therefore, the pause time goal will sometimes not be met. The default value is 200 milliseconds.
**-XX:MaxGCPauseMillis=200** - Sets a target for the maximum GC pause time. This is a soft goal, and the JVM will make its best effort to achieve it. Therefore, the pause time goal will sometimes not be met. 默认值为 200 milliseconds.

**-XX:InitiatingHeapOccupancyPercent=45** - Percentage of the (entire) heap occupancy to start a concurrent GC cycle. It is used by G1 to trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations. A value of 0 denotes 'do constant GC cycles'. The default value is 45 (i.e., 45% full or occupied).
**-XX:InitiatingHeapOccupancyPercent=45** - Percentage of the (entire) heap occupancy to start a concurrent GC cycle. It is used by G1 to trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations. A value of 0 denotes 'do constant GC cycles'. 默认值为 45 (i.e., 45% full or occupied).

#### Best Practices ####

Expand Down Expand Up @@ -548,56 +548,56 @@ This is the complete list of G1 GC switches. Remember to use the best practices
<table>

<tr>
<th>Option and Default Value
<th> 选项/默认值
</th>
<th> Description
<th> 说明
</th>
</tr>

<tr>
<td>-XX:+UseG1GC
</td>
<td> Use the Garbage First (G1) Collector
<td> 使用 G1 (Garbage First) 垃圾收集器
</td>
</tr>

<tr>
<td>
-XX:MaxGCPauseMillis=n
</td>
<td>Sets a target for the maximum GC pause time. This is a soft goal, and the JVM will make its best effort to achieve it.
<td>设置最大GC停顿时间(GC pause time)指标(target). 这是一个软性指标(soft goal), JVM 会尽量去达成这个目标.
</td>
</tr>

<tr>
<td>
-XX:InitiatingHeapOccupancyPercent=n
</td>
<td>Percentage of the (entire) heap occupancy to start a concurrent GC cycle. It is used by GCs that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (e.g., G1). A value of 0 denotes 'do constant GC cycles'. The default value is 45.
<td>Percentage of the (entire) heap occupancy to start a concurrent GC cycle. It is used by GCs that trigger a concurrent GC cycle based on the occupancy of the entire heap, not just one of the generations (e.g., G1). A value of 0 denotes 'do constant GC cycles'. 默认值为 45.
</td>
</tr>

<tr>
<td>
-XX:NewRatio=n
</td>
<td>Ratio of new/old generation sizes. The default value is 2.
<td>新生代与老生代(new/old generation)的大小比例(Ratio). 默认值为 2.
</td>
</tr>

<tr>
<td>
-XX:SurvivorRatio=n
</td>
<td>Ratio of eden/survivor space size. The default value is 8.
<td>eden/survivor 空间大小的比例(Ratio). 默认值为 8.
</td>
</tr>

<tr>
<td>
-XX:MaxTenuringThreshold=n
</td>
<td>Maximum value for tenuring threshold. The default value is 15.
<td>晋升年老代的最大临界值(tenuring threshold). 默认值为 15.
</td>
</tr>

Expand All @@ -613,23 +613,23 @@ This is the complete list of G1 GC switches. Remember to use the best practices
<td>
-XX:ConcGCThreads=n
</td>
<td>Number of threads concurrent garbage collectors will use. The default value varies with the platform on which the JVM is running.
<td>并发垃圾收集器使用的线程数量. 默认值随JVM运行的平台不同而不同.
</td>
</tr>

<tr>
<td>
-XX:G1ReservePercent=n
</td>
<td> Sets the amount of heap that is reserved as a false ceiling to reduce the possibility of promotion failure. The default value is 10.
<td> Sets the amount of heap that is reserved as a false ceiling to reduce the possibility of promotion failure. 默认值为 10.
</td>
</tr>

<tr>
<td>
-XX:G1HeapRegionSize=n
</td>
<td>With G1 the Java heap is subdivided into uniformly sized regions. This sets the size of the individual sub-divisions. The default value of this parameter is determined ergonomically based upon heap size. The minimum value is 1Mb and the maximum value is 32Mb.
<td>With G1 the Java heap is subdivided into uniformly sized regions. This sets the size of the individual sub-divisions. The default value of this parameter is determined ergonomically based upon heap size. 最小值是 1Mb ,最大值为 32Mb.
</td>
</tr>

Expand All @@ -646,7 +646,7 @@ The final topic we need to cover is using logging information to analyze perform

You can set the detail to three different levels of detail.

**(1) -verbosegc** (which is equivalent to **-XX:+PrintGC**) sets the detail level of the log to *fine*.
**(1) -verbosegc** (等价于 **-XX:+PrintGC**) sets the detail level of the log to *fine*.

**Sample Output**

Expand Down

0 comments on commit 79717dc

Please sign in to comment.