Java 8 metaspace garbage collection -


a java process i'm running performs consistently in first hour or runs. however, performance rapidly degrades. when profiling found metaspace garbage collection happened until hour mark , got out of control:

enter image description here

i'm sure i'll able fix using -xx:maxmetaspacesize option. however, i'd know more why behaviour might occurring. can't imagine why garbage collection algorithm behave this. have explanation or advice better fix? thanks

you can try setting -xx:maxmetaspaceexpansion=0. should force full gc - releasing dynamically created methods/class data - before attempting grow metaspace. additionally can try setting maxmetaspacefreeratio lower value default shrink metaspace more after gc.

see this answer other metaspace related options.

metaspace collection relies on classes being unloaded garbage collector. depending on gc you're using tweaking reclaim garbage sooner might help.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -