Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8187338

Per anonymous class class loader data is costly

XMLWordPrintable

      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.




            Unassigned Unassigned
            zgu Zhengyu Gu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: