Thoughts on Java metaspace allocation in IdP 4
simlu at su.se
Mon Jan 18 08:59:24 UTC 2021
On Sat, 2021-01-16 at 00:08:55 +0100, Wessel, Keith wrote:
>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:
>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?
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 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
Acting Technical Manager Identity management
SE-106 91 Stockholm, Sweden
More information about the users