Skip to main content

Beaware!!! with NewRatio while using Concurrent Mark Sweep GC as Garbage Collector


In Sun JDK there were few bugs previously with subject “JDK-6872335 : NewRatio ignored when UseConcMarkSweepGC set”.


Although these bugs are fixed, but IMO the bug still exists for default settings of NewRatio when UseConcMarkSweepGC is used.


We still have the bug where the default NewRatio=2 is not considered along with UseConcMarkSweepGC

Option #1 : Default GC (-XX:+UseParallelGC) : PSYoungGen      total 1835008K = 1.75GB (As it considered the default NewRatio=2)
# /usr/bin/java -server -Xms6144m -Xmx6144m -XX:MaxMetaspaceSize=256m -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -version
-XX:InitialHeapSize=6442450944 -XX:MaxHeapSize=6442450944 -XX:MaxMetaspaceSize=268435456 -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseParallelGC
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Heap
PSYoungGen      total 1835008K, used 94372K [0x0000000740000000, 0x00000007c0000000, 0x00000007c0000000)
  eden space 1572864K, 6% used [0x0000000740000000,0x0000000745c29180,0x00000007a0000000)
  from space 262144K, 0% used [0x00000007b0000000,0x00000007b0000000,0x00000007c0000000)
  to   space 262144K, 0% used [0x00000007a0000000,0x00000007a0000000,0x00000007b0000000)
ParOldGen       total 4194304K, used 0K [0x0000000640000000, 0x0000000740000000, 0x0000000740000000)
  object space 4194304K, 0% used [0x0000000640000000,0x0000000640000000,0x0000000740000000)
Metaspace       used 2189K, capacity 4480K, committed 4480K, reserved 1056768K
  class space    used 240K, capacity 384K, committed 384K, reserved 1048576K
[root@vl-aus-sln-pt39 ~]#

Option #2 : UseConcMarkSweepGC only (-XX:+ UseConcMarkSweepGC) : par new generation   total 153344K = 149.75 MB (Here –XX:NewRatio=2 is ignored which is set by default)

# /usr/bin/java -server -Xms6144m -Xmx6144m -XX:MaxMetaspaceSize=256m -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -version
-XX:InitialHeapSize=6442450944 -XX:MaxHeapSize=6442450944 -XX:MaxMetaspaceSize=268435456 -XX:MaxNewSize=174485504 -XX:MaxTenuringThreshold=6 -XX:NewSize=174485504 -XX:OldPLABSize=16 -XX:OldSize=348971008 -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Heap
par new generation   total 153344K, used 8179K [0x0000000640000000, 0x000000064a660000, 0x000000064a660000)
  eden space 136320K,   6% used [0x0000000640000000, 0x00000006407fcf00, 0x0000000648520000)
  from space 17024K,   0% used [0x0000000648520000, 0x0000000648520000, 0x00000006495c0000)
  to   space 17024K,   0% used [0x00000006495c0000, 0x00000006495c0000, 0x000000064a660000)
concurrent mark-sweep generation total 6121088K, used 0K [0x000000064a660000, 0x00000007c0000000, 0x00000007c0000000)
Metaspace       used 2190K, capacity 4480K, committed 4480K, reserved 1056768K
  class space    used 240K, capacity 384K, committed 384K, reserved 1048576K
[root@vl-aus-sln-pt39 ~]#

Option #3 : UseConcMarkSweepGC along with NewRatio=2 (-XX:+ UseConcMarkSweepGC –XX:NewRatio=2) : par new generation   total 1887488K = 1.8 GB (Here –XX:NewRatio=2 is considered when set explicitly)

# /usr/bin/java -server -Xms6144m -Xmx6144m -XX:MaxMetaspaceSize=256m -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -XX:NewRatio=2 -version
-XX:InitialHeapSize=6442450944 -XX:MaxHeapSize=6442450944 -XX:MaxMetaspaceSize=268435456 -XX:MaxTenuringThreshold=6 -XX:NewRatio=2 -XX:OldPLABSize=16 -XX:+PrintCommandLineFlags -XX:+PrintGCDetails -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
Heap
par new generation   total 1887488K, used 100669K [0x0000000640000000, 0x00000006c0000000, 0x00000006c0000000)
  eden space 1677824K,   6% used [0x0000000640000000, 0x000000064624f7f0, 0x00000006a6680000)
  from space 209664K,   0% used [0x00000006a6680000, 0x00000006a6680000, 0x00000006b3340000)
  to   space 209664K,   0% used [0x00000006b3340000, 0x00000006b3340000, 0x00000006c0000000)
concurrent mark-sweep generation total 4194304K, used 0K [0x00000006c0000000, 0x00000007c0000000, 0x00000007c0000000)
Metaspace       used 2189K, capacity 4480K, committed 4480K, reserved 1056768K
  class space    used 240K, capacity 384K, committed 384K, reserved 1048576K
[root@vl-aus-sln-pt39 ~]#


Set the New Ratio explicitly if we are using ConcMarkSweepGC  . 

Comments

  1. Nice Information
    Yaaron Studios is one of the rapidly growing editing studios in Hyderabad. We are the best Video Editing services in Hyderabad. We provides best graphic works like logo reveals, corporate presentation Etc. And also we gives the best Outdoor/Indoor shoots and Ad Making services.
    Best video editing services in Hyderabad,ameerpet
    Best Graphic Designing services in Hyderabad,ameerpet­
    Best Ad Making services in Hyderabad,ameerpet­

    ReplyDelete
  2. Thanks for sharing
    We are the best piping design course in Hyderabad, India. Sanjary academy Offers Piping Design Course and Best Piping Design Training Institute in Hyderabad. Piping Design Institute in India Piping Design Engineering.
    Piping Design Course
    Piping Design Course in india
    Piping Design Course in hyderabad

    ReplyDelete
  3. Good Information
    "Sanjary Academy provides excellent training for Piping design course. Best Piping Design Training Institute in Hyderabad,
    Telangana. We have offer professional Engineering Course like Piping Design Course,QA / QC Course,document Controller
    course,pressure Vessel Design Course, Welding Inspector Course, Quality Management Course, #Safety officer course."
    Piping Design Course
    Piping Design Course in India­
    Piping Design Course in Hyderabad
    QA / QC Course
    QA / QC Course in india
    QA / QC Course in Hyderabad
    Document Controller course
    Pressure Vessel Design Course
    Welding Inspector Course
    Quality Management Course
    Quality Management Course in india
    Safety officer course

    ReplyDelete

Post a Comment

Popular posts from this blog

Steps to Analyze AWR Report in Oracle

Steps to Analyze AWR Report in Oracle
AWR -Automaticworkload repository is a collection of persistentsystem performancestatisticsowned by SYS. It resides in SYSAUXtablespace. Bydefault snapshot are generated once every 60 min and maintained for 7 days. Each snapshot has a unique ID know as "snap_id". Snapshot detail can be found in "dba_hist_snapshot" view.
If we have Database performance issue and not the Database machine, then AWR Report is the place to look at. AWR is not used for real-time performance monitoring like the v$ tables. It is used for historical analysis of performance. AWR complements, but doesnot replace real-time monitoring.
Once AWR Report is generated in Oracle, the next task is to analyze it. By going through the AWR Report we can easily solve issues like slow database, high wait events, slow query and many more issues. Even though the report is lengthy, Analyzing or Reading relevant part of AWR Report can help to troubleshoot issues in easy and …

Using SQL Developer to create and view Tablespaces

Below are the steps Create and View Table Spaces settings using SQL Developer.
Required SQL developer version is version 3.0
To Create TableSpace :
Click on Menu View/DBA - DBA navigator window will appear.
In the DBA window add a new connection to the DB, and click connect. Then under storage option right click on Tablespaces and choose New Tablespace to create new one. Fill the Details as shown below:


To View the created table spaces: Under Storage, Select Data Files:
It will display the below: