metaspace proportion of fragmentation

Brian Toal brian.toal at gmail.com
Fri Oct 21 23:55:39 UTC 2016


Good evening.  In a application that I'm responsible for, Metaspace is set
to 1.1GB.  Specifically the following flags are set:

-XX:MetaspaceSize=1152m
-XX:MaxMetaspaceSize=1152m
-XX:MinMetaspaceFreeRatio=0
-XX:MaxMetaspaceFreeRatio=100

However we are getting a OOME when metaspace size hits 80% of 1.1GB.  Doing
a bit or research it seems that Metaspace is known to fragement the memory
when a loader needs to acquire memory from the current chunk, and the
current chuck can't accomodate the request, the pointer is bumped to the
next available chunk, meaning any free memory in the previous chunks block
is gone with the wind.  More than happy if someone corrects my understand
here or can point me to a good reference that explains this in detail.

My question is, how to do I monitor current usage + fragmentation so the
proportion of free space can be monitored?

Also is there any tuning that can take place to reduce the proportion of
fragmentation?

Does compressed cache acquire memory from memory set aside from memory
allocated via MaxMetaspaceSize?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20161021/8e56bc9d/attachment.html>


More information about the hotspot-gc-use mailing list