XX:MaxPermSize=128m for Tomcat 8 / Java 7, why?
Walter Forbes Hoehn (wassa)
wassa at memphis.edu
Fri Nov 20 09:47:36 EST 2015
I think it’s likely that is just stale advice that has been carried forward. Regardless, the setting has been eliminated completely in JRE8.
-WFH
> On Nov 20, 2015, at 8:38 AM, Etienne Dysli-Metref <etienne.dysli-metref at switch.ch> wrote:
>
> The wiki page
> https://wiki.shibboleth.net/confluence/display/IDP30/ApacheTomcat8
> recommends putting -XX:MaxPermSize=128m in CATALINA_OPTS to set the
> PermGen space size, but unfortunately without saying why this is
> necessary. Does anyone know the explanation?
>
> It turns out this actually makes the PermGen space *smaller* depending
> on the amount of RAM your machine has. I've tried with 1, 2 and 8GB and
> my JVM would always choose 166MB for PermGen. I don't see any reason to
> reduce PermGen, especially with Tomcat having a tendency to quickly fill
> it up when redeploying a webapp several times.
>
> For example:
>
> $ java -XX:MaxPermSize=128m -XX:+PrintFlagsFinal -version | grep PermSize
> uintx AdaptivePermSizeWeight = 20 {product}
> uintx MaxPermSize := 134217728 {pd product}
> uintx PermSize = 21757952 {pd product}
> java version "1.7.0_91"
> OpenJDK Runtime Environment (rhel-2.6.2.1.el7_1-x86_64 u91-b00)
> OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
>
> $ java -XX:+PrintFlagsFinal -version | grep PermSize
> uintx AdaptivePermSizeWeight = 20 {product}
> uintx MaxPermSize = 174063616 {pd product}
> uintx PermSize = 21757952 {pd product}
> java version "1.7.0_91"
> OpenJDK Runtime Environment (rhel-2.6.2.1.el7_1-x86_64 u91-b00)
> OpenJDK 64-Bit Server VM (build 24.91-b01, mixed mode)
>
> $ free -h
> total used free shared buff/cache available
> Mem: 993M 609M 81M 14M 301M 231M
> Swap: 1.5G 0B 1.5G
>
> Etienne
>
> --
> To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net
More information about the users
mailing list