SurvivorRatioパラメーターは、2 つの生存者スペースのサイズを制御します。たとえば、-XX:SurvivorRatio=6 は、各サバイバー スペースと eden の比率を 1:6 に設定します。各サバイバー スペースは、若い世代の 8 分の 1 になります。
以下のように、survivor と eden の容量が SurvivorRatio と一致しないのはなぜですか? がプロデュースjmap -heap 15760
。
Attaching to process ID 15760, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 24.80-b11
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 4294967296 (4096.0MB)
NewSize = 1310720 (1.25MB)
MaxNewSize = 17592186044415 MB
OldSize = 5439488 (5.1875MB)
NewRatio = 2
SurvivorRatio = 8
PermSize = 21757952 (20.75MB)
MaxPermSize = 1073741824 (1024.0MB)
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 1074266112 (1024.5MB)
used = 276841328 (264.01646423339844MB)
free = 797424784 (760.4835357666016MB)
25.770274693352704% used
From Space:
capacity = 178782208 (170.5MB)
used = 56996280 (54.35588836669922MB)
free = 121785928 (116.14411163330078MB)
31.880286432081654% used
To Space:
capacity = 178782208 (170.5MB)
used = 0 (0.0MB)
free = 178782208 (170.5MB)
0.0% used
PS Old Generation
capacity = 2863661056 (2731.0MB)
used = 98320 (0.0937652587890625MB)
free = 2863562736 (2730.906234741211MB)
0.003433367220397748% used
PS Perm Generation
capacity = 47710208 (45.5MB)
used = 47664440 (45.45635223388672MB)
free = 45768 (0.04364776611328125MB)
99.90407084370707% used
26132 interned Strings occupying 2933384 bytes.