[jboss-jira] [JBoss JIRA] (WFCORE-4978) Remove setting Metaspace

James Perkins (Jira) issues at jboss.org
Thu May 21 12:26:29 EDT 2020


     [ https://issues.redhat.com/browse/WFCORE-4978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Perkins moved WFLY-13301 to WFCORE-4978:
----------------------------------------------

    Project: WildFly Core  (was: WildFly)
        Key: WFCORE-4978  (was: WFLY-13301)


> Remove setting Metaspace
> ------------------------
>
>                 Key: WFCORE-4978
>                 URL: https://issues.redhat.com/browse/WFCORE-4978
>             Project: WildFly Core
>          Issue Type: Enhancement
>            Reporter: Moulali Shikalwadi
>            Assignee: Moulali Shikalwadi
>            Priority: Major
>
> Unlike perm gen, it is typically not necessary to set a max/min metaspace size[1] for the following reasons:
> *Metaspace size is unlimited by default. Since it only holds class metadata, size requirements are minimal.
> *It does not require a full gc to resize the metaspace, as it did with the perm generation.
> MaxMetaspaceSize includes CompressedClassSpaceSize, so MaxMetaspaceSize should be larger than CompressedClassSpaceSize.
> The default MaxMetaspaceSize is 1g:
> java -XX:+PrintFlagsFinal -version | grep CompressedClassSpaceSize
> uintx CompressedClassSpaceSize = 1073741824
> {product}
> If MaxMetaspaceSize is set smaller than CompressedClassSpaceSize, the JVM auto adjusts CompressedClassSpaceSize as follows: CompressedClassSpaceSize = MaxMetaspaceSize - (2 * InitialBootClassLoaderMetaspaceSize).[2]
> The default EAP Metaspace sizes are less than the default CompressedClassSpaceSize:
> -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m
> This adjusts down the MaxMetaspaceSize to 248m:
> java -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -XX:+PrintFlagsFinal -version | grep CompressedClassSpaceSize
> uintx CompressedClassSpaceSize := 260046848 {product}
> We have had a lot of OOME Metaspace cases[3], and support is no longer recommending customers set Metaspace:
> "In general, you should not need to set a maximum size, unless you are experiencing large metaspace leaks and would prefer it to fail rather than keep increasing memory size."[1]
> This was discussed with the OpenJDK developers[4], and their recommendation was to remove the Metaspace settings, and especially in the context of containers.
> References:
> [1]https://access.redhat.com/solutions/1489263
> [2]https://access.redhat.com/solutions/2132101
> [3]https://access.redhat.com/solutions/2038983
> [4]http://post-office.corp.redhat.com/archives/support-openjdk/2019-July/msg00003.html



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list