2

考虑以下 JVM 设置:

-d64 -server -Xms40g -Xmx40g -XX:+UseG1GC -XX:NewRatio=1 -XX:G1ReservePercent=10 -XX:MaxGCPauseMillis=100 -XX:InitiatingHeapOccupancyPercent=30 -verbose:gc -Xloggc:/var/log/gc_solr.log -XX:PermSize=728m -XX:MaxPermSize=728m

jmap 给出以下内容:

Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize      = 42949672960 (40960.0MB)
   NewSize          = 1363144 (1.2999954223632812MB)
   MaxNewSize       = 17592186044415 MB
   OldSize          = 5452592 (5.1999969482421875MB)
   NewRatio         = 1
   SurvivorRatio    = 8
   PermSize         = 754974720 (720.0MB)
   MaxPermSize      = 763363328 (728.0MB)
   G1HeapRegionSize = 16777216 (16.0MB)

Heap Usage:
G1 Heap:
   regions  = 2560
   capacity = 42949672960 (40960.0MB)
   used     = 100663296 (96.0MB)
   free     = 42849009664 (40864.0MB)
   0.234375% used
G1 Young Generation:
Eden Space:
   regions  = 6
   capacity = 22548578304 (21504.0MB)
   used     = 100663296 (96.0MB)
   free     = 22447915008 (21408.0MB)
   0.44642857142857145% used
Survivor Space:
   regions  = 0
   capacity = 0 (0.0MB)
   used     = 0 (0.0MB)
   free     = 0 (0.0MB)
   0.0% used
G1 Old Generation:
   regions  = 0
   capacity = 20401094656 (19456.0MB)
   used     = 0 (0.0MB)
   free     = 20401094656 (19456.0MB)
   0.0% used
Perm Generation:
   capacity = 754974720 (720.0MB)
   used     = 21380584 (20.390113830566406MB)
   free     = 733594136 (699.6098861694336MB)
   2.831960254245334% used

我不明白为什么幸存者空间容量为0?

我尝试过 NewRatio / SurvivorRatio 的不同组合,但没有取得多大成功。

幸存者空间取决于什么?我认为它应该是伊甸园空间的比例。

4

1 回答 1

1

所以最后很简单。幸存者空间的容量在应用程序开始使用时显示。

那是相当混乱...

于 2013-04-10T14:48:01.813 回答