Thoughts on Java metaspace allocation in IdP 4

Wessel, Keith kwessel at illinois.edu
Tue Jan 19 23:02:44 UTC 2021


Thanks, Scott and Simon. This helps a lot.

Keith


-----Original Message-----
From: users <users-bounces at shibboleth.net> On Behalf Of Simon Lundström
Sent: Monday, January 18, 2021 2:59 AM
To: Shib Users <users at shibboleth.net>
Subject: Re: Thoughts on Java metaspace allocation in IdP 4

On Sat, 2021-01-16 at 00:08:55 +0100, Wessel, Keith wrote:
>Hi, all,
>
>In reading up on Java's move from perm space to metaspace, I'm learning that it's advisable in many cases to limit Java's amount of memory used for metaspace with something like:
>
>-XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=1024m
>
>Those numbers are probably too large for Shibboleth, I'm guessing. But if not set, it sounds like the metaspace can be as large as Tomcat or Jetty let it be.
>
>The wiki doesn't seem to offer any advice on these settings. Are there recommended values? Or can I assume that the IdP's use of metaspace and Java's garbage collection with - XX:+UseG1GC are good enough?

I've never had reason to change them either. It's usually very large 
apps which keeps a lot of compiled classes IIRC. And apps that load and 
unload a lot of classes?
https://urldefense.com/v3/__https://wiki.openjdk.java.net/display/HotSpot/Metaspace__;!!DZ3fjg!qoUqANAqP3_Rqy-QiGrg4IG6ATw-LO2IFHjNmcMZhQdAFP1vXC-Pfqgf23BmK2eM6g$ 

Anyway, when in doubt measure it! As a one off use jconsole/jvisualvm 
and for continuous production usage use a JMX exporter to export the 
metrics to your metricsplatform. We use jmxtrans-agent[1] on all our 
IDPs and most of our other Java apps and we love it.

In JConsole I'm pretty sure that metaspace is the "Non-Heap Memory 
Usage" under the "Memory" tab. And in JMX the MBean would be 
java.lang:type=Memory:NonHeapMemoryUsage.

BR,
- Simon

1, <https://urldefense.com/v3/__https://github.com/jmxtrans/jmxtrans-agent__;!!DZ3fjg!qoUqANAqP3_Rqy-QiGrg4IG6ATw-LO2IFHjNmcMZhQdAFP1vXC-Pfqgf23BxqBiXng$ >

____________________________________

Simon Lundström
Acting Technical Manager Identity management

IT Services
Stockholm University
SE-106 91 Stockholm, Sweden

https://urldefense.com/v3/__http://www.su.se/english/staff-info/it__;!!DZ3fjg!qoUqANAqP3_Rqy-QiGrg4IG6ATw-LO2IFHjNmcMZhQdAFP1vXC-Pfqgf23BqPjZKkQ$ 
https://urldefense.com/v3/__https://www.su.se/english/about-this-website/privacy-policy__;!!DZ3fjg!qoUqANAqP3_Rqy-QiGrg4IG6ATw-LO2IFHjNmcMZhQdAFP1vXC-Pfqgf23CHh0qmAw$ 
-- 
For Consortium Member technical support, see https://urldefense.com/v3/__https://wiki.shibboleth.net/confluence/x/coFAAg__;!!DZ3fjg!qoUqANAqP3_Rqy-QiGrg4IG6ATw-LO2IFHjNmcMZhQdAFP1vXC-Pfqgf23Asm4yHVA$ 
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net


More information about the users mailing list