JDK-8024547 : MaxMetaspaceSize should limit the committed memory used by the metaspaces
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs25
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-09-10
  • Updated: 2014-01-14
  • Resolved: 2013-10-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8Fixed hs25Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Duplicate :  
Relates :  
Description
Today the MaxMetaspaceSize flag is neither well-specified nor honored correctly.

The suggestion is to make MaxMetaspaceSize limit the committed memory used in both the non-class metaspaces and the compressed class space. 

Fixed:
* Word and Bytes mixing: Remove incorrect usage of Metablock::_overhead (JDK-8024651)
* Word and Bytes mixing: Fix MetaspaceAux::reserved_in_bytes() (JDK-8023476)
* Word and Bytes mixing:  Fix MaxMetaspaceSize check (JDK-8025059)
* Keep track of the committed memory in the metaspaces (JDK-8024638)
* Make MetaspaceSize limited by MaxMetaspaceSize and not the other way around (JDK-8024650)
* Fix our metaspace tracing code, which crashes, writes incorrect values (JDK-8024751, JDK-8024752)
* Reflect all this in our metaspace counters and mbean pools. (JDK-8023476, JDK-8023219)
* Fix bugs in TraceMetadata* (JDK-8024752)
* Log TraceMetadata* output to gclog_or_tty instead of tty (JDK-8024752) 
* Remove incorrect, unused code (JDK-8024547)
* Some renaming to make the code more self-explanatory (JDK-8024547)
* Don't over-commit when using large pages, or turn off large pages for the metaspaces. (JDK-8024547)
* Don't use min_alignment()/max_alignment() to align MetaspaceSize/MaxMetaspaceSize. (JDK-8024547)
* Compare MaxMetaspaceSize against committed memory (JDK-8024547)
* Induce GC when compressed class space allocations pass the MaxMetaspaceSize, not only non-class metaspace allocations. (JDK-8024547)
* Fix metaspace LowMemory/PeakMemory detector - call MemoryService::track_* when allocating metadata (JDK-8025996)

Deferred suggestions:
* Stop leaving unused reserved memory in non-class metaspaces
* Stop leaving unused committed memory
* Make capacity_until_GC limited by MaxMetaspaceSize

Comments
Disregard the HG Updates comment above. It was created because of an incorrect push. The real fix info is: URL: http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/85c1ca43713f User: stefank Date: 2013-10-07 15:51:08 2013 +0200
11-10-2013