-
Enhancement
-
Resolution: Won't Fix
-
P3
-
10
Each anonymous class has its own class loader data, and it appears to be VERY costly.
The cost does not show up in overall metaspace statistics, because it does not reflect the reality that the free space held by these class loader data can not be used by others.
One statistics (wildfly https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-rest-http) shows that 60+% of metadata held by them is wasted.
Link to full log: http://cr.openjdk.java.net/~zgu/cld_metaspace/wildfly.txt
The patch for reporting per-class loader data's metaspace info:
http://cr.openjdk.java.net/~zgu/cld_metaspace/webrev.00/
Given Lambda's growing popularity, I can expect the situation to get worse.
The cost does not show up in overall metaspace statistics, because it does not reflect the reality that the free space held by these class loader data can not be used by others.
One statistics (wildfly https://github.com/wildfly-swarm-openshiftio-boosters/wfswarm-rest-http) shows that 60+% of metadata held by them is wasted.
Link to full log: http://cr.openjdk.java.net/~zgu/cld_metaspace/wildfly.txt
The patch for reporting per-class loader data's metaspace info:
http://cr.openjdk.java.net/~zgu/cld_metaspace/webrev.00/
Given Lambda's growing popularity, I can expect the situation to get worse.
- relates to
-
JDK-8190729 Adjustment to anonymous metadata space chunk allocation algorithm
- Resolved
-
JDK-8205939 JVM support to replace Unsafe.defineAnonymousClass
- Closed
-
JDK-8221173 JEP 387: Elastic Metaspace
- Closed
-
JDK-8191924 Adjust DelegatingClassLoader's metadata space sizing algorithm
- Resolved