[JEP 387](https://openjdk.java.net/jeps/387) "Elastic Metaspace" overhauls the VM-internal metaspace- and class-space-implementation. Less memory is used for class metadata. The savings effect is mostly noticeable in scenarios involving lots of small grained class loaders. Upon class unloading, memory is timely returned to the operating system. A switch is added to fine-tune metaspace reclamation: `-XX:MetaspaceReclaimPolicy=(balanced|aggressive|none)`. `balanced`, the default, causes the VM to reclaim memory while keeping computational overhead minimal; `aggressive` moderately increases the reclaim rate at the cost of somewhat more expensive bookkeeping; `none` switches reclamation off altogether. The switches `InitialBootClassLoaderMetaspaceSize` and `UseLargePagesInMetaspace` have been deprecated.
|