My talk at FOSDEM 2020 in the Java Devroom.
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 explores what Metaspace actually is and what is stored there; describes the architecture of the Metaspace allocator and the Compressed Class Space; how it interacts with the GC.
It also describes a new Metaspace prototype which a much improved elasticity and reduced footprint developed at SAP (see also upcoming JEP "Elastic Metaspace": https://bugs.openjdk.java.net/browse/JDK-8221173).