We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Taming Metaspace: a look at the machinery, and a proposal for a better one

Formal Metadata

Title
Taming Metaspace: a look at the machinery, and a proposal for a better one
Title of Series
Number of Parts
490
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
When examining memory footprint of a JVM process, the delta between Java heap usage and actual working set size can be surprisingly large. The JVM uses off-heap memory for a lot of things: thread stacks, compiler arenas, code heap, byte buffers, GC control... however, one of the largest consumers of off-heap memory can be class metadata. Class metadata are stored in Metaspace, which includes the Compressed Class Space. The talk will explore what Metaspace actually is and what is stored there; describe the architecture of the Metaspace allocator and the Compressed Class Space; how it interacts with the GC; how it is sized. We will highlight waste areas and demonstrate how to use jcmd to examine Metaspace internals. The current implementation of the Metaspace allocator suffers from a number of shortcomings. They can manifest in excessive waste and a certain "clinginess" - an unwillingness to let go of unused memory. At SAP, we developed an improved version which is more frugal with memory and provides a much improved elasticity. So the second part of this talk will concentrate on our new implementation. We will highlight the differences to the old architecture, demonstrate advantages and examine how it works.