I have the same span when I launch my web application under tomcat or jetty. Genome read-only memory is used to load classes, and the idea is that "Classes load once and for all." Since I use quite a few Spring libraries and frameworks, this memory fills up very quickly when I redeploy the web application several times without reloading the servlet container.
I found that increasing the maximum continuous generation is not enough. You also need to allow garbage collection to remove unused classes at runtime, otherwise it will be full and throw a PermGen space exception. Here are the JVM options I added for my servlet containers,
-XX:PermSize=128m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize used to set the maximum value of continuous generation. This should be larger than the default size.
-XX:+CMSClassUnloadingEnabled This option is used to allow the JVM to unload the class at runtime. By default, class unloading is disabled. For Java 5, please read.
-XX:+UseConcMarkSweepGC , for the class loading option to work, this parameter must also be set ( ref )
In addition, you should consider upgrading the JVM version. Java 5 is too old.
source share