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.)
- clones
-
WFLY-5955 Include -XX:MetaspaceSize in our default vm settings
- Closed
- is related to
-
JBEAP-174 Reevaluation of java memory settings
- Closed
-
JBEAP-24746 Remove Metaspace options
- Coding In Progress