-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b49
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8024583 | 8 | Bengt Rutisson | P4 | Resolved | Fixed | b107 |
When G1 decides on the heap region size it aims for 2048 regions for the heap size. But the heap size it is using is the minimum heap size that Arguments::min_heap_size() picks.
This size is normally very small. If you set -Xms on the command line this value will be used, but otherwise the value is OldSize + NewSize, which defaults to about 6MB.
This means that HeapRegion::setup_heap_region_size() will almost always come up with a G1 region size of 1MB since this is the minimum region size.
In performance testing we have seen improvements with larger heap regions. Larger heap regions also lead to fewer regions which lead to less memory footprint overhead as we have fixed memory costs for each region.
A more reasonable calculation would be to use the average heap size to determine the region size.
This size is normally very small. If you set -Xms on the command line this value will be used, but otherwise the value is OldSize + NewSize, which defaults to about 6MB.
This means that HeapRegion::setup_heap_region_size() will almost always come up with a G1 region size of 1MB since this is the minimum region size.
In performance testing we have seen improvements with larger heap regions. Larger heap regions also lead to fewer regions which lead to less memory footprint overhead as we have fixed memory costs for each region.
A more reasonable calculation would be to use the average heap size to determine the region size.
- backported by
-
JDK-8024583 G1: Use the average heap size rather than the minimum heap size to calculate the region size
- Resolved
- duplicates
-
JDK-8020599 G1: VM crashed with OOME on solaris with large heap
- Closed
- relates to
-
JDK-8025564 gc/memory/UniThread/Linear1 times out during heap verification
- Resolved
-
JDK-8020599 G1: VM crashed with OOME on solaris with large heap
- Closed
-
JDK-8241670 Enhance heap region size ergonomics to improve OOTB performance
- Resolved