-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
8
The default JVM 1.8 configuration does not properly configure Eden/Survivor spaces.
While the JVM default is SurvivorRatio=8 and it says so, the actual sizes of
Eden and Survivor areas are the same (which mean that SurvivorRatio=1) .
$ ./jmap -heap 25879
Attaching to process ID 25879, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.151-b12
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 12884901888 (12288.0MB)
NewSize = 536870912 (512.0MB)
MaxNewSize = 4294967296 (4096.0MB)
OldSize = 1073741824 (1024.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 1390411776 (1326.0MB)
used = 1390411776 (1326.0MB)
free = 0 (0.0MB)
100.0% used
From Space:
capacity = 1278738432 (1219.5MB)
used = 0 (0.0MB)
free = 1278738432 (1219.5MB)
0.0% used
To Space:
capacity = 1431306240 (1365.0MB)
used = 0 (0.0MB)
free = 1431306240 (1365.0MB)
0.0% used
PS Old Generation
capacity = 8589934592 (8192.0MB)
used = 8499819848 (8106.059883117676MB)
free = 90114744 (85.94011688232422MB)
98.95092630758882% used
If we explicitly add -XX:SurvivorRatio=8, it restores what it should be.
$ ./jmap -heap 7764
Attaching to process ID 7764, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.151-b12
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 12884901888 (12288.0MB)
NewSize = 536870912 (512.0MB)
MaxNewSize = 4294967296 (4096.0MB)
OldSize = 1073741824 (1024.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 3666345984 (3496.5MB)
used = 2636838920 (2514.6855545043945MB)
free = 1029507064 (981.8144454956055MB)
71.92007877890447% used
From Space:
capacity = 157810688 (150.5MB)
used = 114371680 (109.07333374023438MB)
free = 43439008 (41.426666259765625MB)
72.47397590713247% used
To Space:
capacity = 159383552 (152.0MB)
used = 0 (0.0MB)
free = 159383552 (152.0MB)
0.0% used
PS Old Generation
capacity = 8589934592 (8192.0MB)
used = 6882442576 (6563.60871887207MB)
free = 1707492016 (1628.3912811279297MB)
80.12217674404383% used
While the JVM default is SurvivorRatio=8 and it says so, the actual sizes of
Eden and Survivor areas are the same (which mean that SurvivorRatio=1) .
$ ./jmap -heap 25879
Attaching to process ID 25879, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.151-b12
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 12884901888 (12288.0MB)
NewSize = 536870912 (512.0MB)
MaxNewSize = 4294967296 (4096.0MB)
OldSize = 1073741824 (1024.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 1390411776 (1326.0MB)
used = 1390411776 (1326.0MB)
free = 0 (0.0MB)
100.0% used
From Space:
capacity = 1278738432 (1219.5MB)
used = 0 (0.0MB)
free = 1278738432 (1219.5MB)
0.0% used
To Space:
capacity = 1431306240 (1365.0MB)
used = 0 (0.0MB)
free = 1431306240 (1365.0MB)
0.0% used
PS Old Generation
capacity = 8589934592 (8192.0MB)
used = 8499819848 (8106.059883117676MB)
free = 90114744 (85.94011688232422MB)
98.95092630758882% used
If we explicitly add -XX:SurvivorRatio=8, it restores what it should be.
$ ./jmap -heap 7764
Attaching to process ID 7764, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.151-b12
using thread-local object allocation.
Parallel GC with 8 thread(s)
Heap Configuration:
MinHeapFreeRatio = 0
MaxHeapFreeRatio = 100
MaxHeapSize = 12884901888 (12288.0MB)
NewSize = 536870912 (512.0MB)
MaxNewSize = 4294967296 (4096.0MB)
OldSize = 1073741824 (1024.0MB)
NewRatio = 2
SurvivorRatio = 8
MetaspaceSize = 21807104 (20.796875MB)
CompressedClassSpaceSize = 1073741824 (1024.0MB)
MaxMetaspaceSize = 17592186044415 MB
G1HeapRegionSize = 0 (0.0MB)
Heap Usage:
PS Young Generation
Eden Space:
capacity = 3666345984 (3496.5MB)
used = 2636838920 (2514.6855545043945MB)
free = 1029507064 (981.8144454956055MB)
71.92007877890447% used
From Space:
capacity = 157810688 (150.5MB)
used = 114371680 (109.07333374023438MB)
free = 43439008 (41.426666259765625MB)
72.47397590713247% used
To Space:
capacity = 159383552 (152.0MB)
used = 0 (0.0MB)
free = 159383552 (152.0MB)
0.0% used
PS Old Generation
capacity = 8589934592 (8192.0MB)
used = 6882442576 (6563.60871887207MB)
free = 1707492016 (1628.3912811279297MB)
80.12217674404383% used