사용자 도구

사이트 도구


java:g1gc

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
java:g1gc [2018/03/20 12:46]
kwon37xi [참조]
java:g1gc [2022/03/18 15:37] (현재)
kwon37xi
줄 4: 줄 4:
 ===== 기본 설정 ===== ===== 기본 설정 =====
 <code> <code>
 +-XX:+UseG1GC -XX:+DisableExplicitGC -XX:+UseStringDeduplication
 </code> </code>
-  * ''-XX:MaxGCPauseMillis=밀리세컨드'' +  * ''-XX:MaxGCPauseMillis=밀리세컨드'' default=200ms 
-  * ''-XX:G1HeapRegionSize=숫자m''+  * ''-XX:G1HeapRegionSize=숫자m'' 보통은 Heap size 기준으로 2018개로 리젼을 나누면서 사이즈가 1mb~32mb 되도록 최선으로 결정되지만 사용하는 데이터 종류에 따라 직접 지정가능. 2의 제곱으로 지정할 것.
   * ''-XX:ParallelGCThreads=숫자''   * ''-XX:ParallelGCThreads=숫자''
   * ''-XX:ConcGCThreads=숫자''   * ''-XX:ConcGCThreads=숫자''
 +  * ''-XX:+UseStringDeduplication'' : 불필요한 문자열 중복 생성 방지 G1 에서만 기능함 [[https://dzone.com/articles/easy-change-to-reduce-memory-by-20|G1 GC: Reducing Memory Consumption by 20%]]
  
 ===== Java 8 Metaspace Class Unloading ===== ===== Java 8 Metaspace Class Unloading =====
줄 19: 줄 20:
 </code> </code>
  
 +===== 주의 =====
 +  * ''-Xmn''과 ''-XX:NewRation''는 사용하지 말 것.
 +    * ''Young Generation Size: Avoid explicitly setting young generation size with the -Xmn option or any or other related option such as -XX:NewRatio. Fixing the size of the young generation overrides the target pause-time goal.''
 ===== 참조 ===== ===== 참조 =====
   * Java 7 u60 이상 버전에서 G1 GC 사용할 것. 그 이하버전에 버그가 좀 많다고 함.   * Java 7 u60 이상 버전에서 G1 GC 사용할 것. 그 이하버전에 버그가 좀 많다고 함.
-  * [[http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html|Garbage First Garbage Collector Tuning]] +  * [[https://www.oracle.com/technical-resources/articles/java/g1gc.html|Garbage First Garbage Collector Tuning]]
   * [[https://bugs.openjdk.java.net/browse/JDK-8038348|[JDK-8038348] Instance field load is replaced by wrong data Phi]] : [[search:lucene|Lucene]] 사용에 영향을 끼치는 G1 GC Bug   * [[https://bugs.openjdk.java.net/browse/JDK-8038348|[JDK-8038348] Instance field load is replaced by wrong data Phi]] : [[search:lucene|Lucene]] 사용에 영향을 끼치는 G1 GC Bug
   * [[http://www.infoq.com/articles/G1-One-Garbage-Collector-To-Rule-Them-All|G1: One Garbage Collector To Rule Them All]] G1 GC 작동 원리에 대한 상세한 설명   * [[http://www.infoq.com/articles/G1-One-Garbage-Collector-To-Rule-Them-All|G1: One Garbage Collector To Rule Them All]] G1 GC 작동 원리에 대한 상세한 설명
-  * [[http://www.infoq.com/articles/tuning-tips-G1-GC|Tips for Tuning the Garbage First Garbage Collector]]+  * [[https://www.infoq.com/articles/tuning-tips-G1-GC|Tips for Tuning the Garbage First Garbage Collector]]
   * [[http://www.oracle.com/technetwork/tutorials/tutorials-1876574.html|Getting Started with the G1 Garbage Collector]]   * [[http://www.oracle.com/technetwork/tutorials/tutorials-1876574.html|Getting Started with the G1 Garbage Collector]]
   * [[https://software.intel.com/en-us/blogs/2014/06/18/part-1-tuning-java-garbage-collection-for-hbase|Part #1 - Tuning Java Garbage Collection for HBase]]   * [[https://software.intel.com/en-us/blogs/2014/06/18/part-1-tuning-java-garbage-collection-for-hbase|Part #1 - Tuning Java Garbage Collection for HBase]]
줄 46: 줄 49:
     * [[https://www.redhat.com/en/blog/part-1-introduction-g1-garbage-collector|Part 1: Introduction to the G1 Garbage Collector]]     * [[https://www.redhat.com/en/blog/part-1-introduction-g1-garbage-collector|Part 1: Introduction to the G1 Garbage Collector]]
     * [[https://www.redhat.com/en/blog/collecting-and-reading-g1-garbage-collector-logs-part-2|Collecting and reading G1 garbage collector logs - part 2]]     * [[https://www.redhat.com/en/blog/collecting-and-reading-g1-garbage-collector-logs-part-2|Collecting and reading G1 garbage collector logs - part 2]]
 +    * [[https://product.hubspot.com/blog/g1gc-fundamentals-lessons-from-taming-garbage-collection|G1GC Fundamentals: Lessons from Taming Garbage Collection]]
 +    * [[https://www.slideshare.net/jelastic/elastic-jvm-automatic-vertical-scaling-of-the-java-heap|Elastic JVM: Automatic Vertical Scaling of the Java Heap]]
 +    * [[https://dzone.com/articles/java-garbage-collection-3|Java Garbage Collection - DZone Java]]
java/g1gc.1521519395.txt.gz · 마지막으로 수정됨: 2018/03/20 12:46 저자 kwon37xi