Why does my garbage collection log show 3.8GB as the max available heap size while I have allocated 4GB as the max heap size?

后端 未结 1 2059
长情又很酷
长情又很酷 2020-12-11 22:09

I have a 64-bit hotspot JDK version 1.7.0 installed on a 64-bit RHEL 6 machine. I use the following JVM options for my tomcat application.

CATALINA_OPTS=\"${         


        
相关标签:
1条回答
  • 2020-12-11 22:34

    New Generation (2048M) consists of 80% Eden (1638.4M) and two Survivor Spaces (10% or 204.8M each):

    Heap
     par new generation   total 1887488K, used 134226K [0x00000006fae00000, 0x000000077ae00000, 0x000000077ae00000)
      eden space 1677824K,   8% used [0x00000006fae00000, 0x00000007031148e0, 0x0000000761480000)
      from space 209664K,   0% used [0x0000000761480000, 0x0000000761480000, 0x000000076e140000)
      to   space 209664K,   0% used [0x000000076e140000, 0x000000076e140000, 0x000000077ae00000)
     concurrent mark-sweep generation total 2097152K, used 242K [0x000000077ae00000, 0x00000007fae00000, 0x00000007fae00000)
    

    At any time one of survivor spaces is empty (see Generations).
    So, the useful heap size is 1638.4 + 204.8 + 2048 = 3891.2 MB

    0 讨论(0)
提交回复
热议问题