jvm - Java 8: Why does Metaspace size increase but number of loaded classes stay the same? -


in our app running on jdk 8 use visualvm track usage of loaded classes , usage of metaspace.

at point in time while our app running see number of loaded classes don't increase more metaspace still increases in it's size while our program running. else apart classes stored in metaspace, cause that?

while program running, parts of code may determined "hot" hotspot's jit compiler. cause parts transformed/compiled native code, , other code may inlined it. native code representation has go somewhere, , goes same place other class metadata - metaspace.

it explains continuous growth you're seeing: hot parts determined on time using simple metric of how times did piece of code got executed. on time more , more code pieces jit'ed they'll hit threshold set -xx:compilethreshold (defaults 10000)


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -