When looking at the GCMonitor Memory Pool metrics for Eden, Survivor, PermGen (Java 7 only) and Metaspace (Java 8 only), you see a String value of Unlimited for the Maximum Capacity (bytes) metric.
Old Gen will still report a numerical value in all cases.
Typically, you see this issue where G1GC garbage collection is specified in the JVM arguments (-XX:+UseG1GC).
If G1GC is not used, then numerical values are reported for Maximum Capacity.
Also, you would notice that the metric "Percentage of Maximum Capacity Currently Used" will stay at 0 where the issue is present.
Java Agent running in Oracle Java 7 or Java 8 that supports G1 garbage collection, the issue was reported in APM 9.7 but the behavior has also been investigated in APM 10.1.
Can occur for any operating system.
Due to the different structure of G1 garbage collection, the reporting of the value Unlimited is actually correct. By default there is no actual limit to the values.
Since no numerical value is reported for Maximum Capacity, no percentage can be calculated for it, which is why a value of 0 is reported.
In Java 8, you can use an extra Java property to specify a limit to the metaspace size, in which case a numerical value for Maximum Capacity will be reported by APM.
To set a metaspace size of 512MB, you would use this JVM parameter:
Reference to Java 8 properties: