Basically, most people configure -Xmx, which means memory reserved for the Java heap. If in the box where Tomcat is running, nothing else is running that eats RAM, and you do not do a lot of I / O (which is beneficial to use RAM as a cache), you should usually let Tomcat use as much memory as possible.
Past times since the last time I had to configure Tomcat, but it was more convenient to set up garbage collection.
Use any JMX management tool to monitor memory usage; JConsole comes with the JDK and is very useful.
source share