Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-2605

Include -XX:MetaspaceSize in our default vm settings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.ER4
    • 7.0.0.ER3
    • Server
    • None
    • Regression

      JDK 8 no longer has a perm gen, but it does have a "Metaspace" area of native memory where it stores some of the types of data previously stored in perm gen, class metadata in particular.

      The default size of this is, I believe 21MB on a 64 bit VM. Full WildFly uses over 50MB, excluding apps. The VM will increase the size once it gets over a certain percentage full, but it will do a full, stop-the-world GC before increasing. This means full WildFly has two full GCs as part of boot.

      The -XX:MetaspaceSize JVM option allows the minimum size to be set. Using a reasonable value for this will help avoid unnecessary full GCs.

      I'm not sure the best value to use. A minimum of 80MB was enough to avoid a full GC during a boot of standalone-full-ha.xml. But then any sort of deployments will trigger a full GC. OTOH, our host.xml jvm elements have historically included a -XX:PermSize setting of 256M, so that's another possible value. Perm Gen and Metaspace aren't completely equivalent (e.g. before JDK 7 perm gen included stuff like interned strings, which are now in the heap.)

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: