I have a couple of questions. My end goal is to try to find out more about our web app's memory usage without having to use an expensive profiler. We would like to have an idea of how much memory an average session uses. Is our best option to just repeatedly call
as we open up more sessions to get an idea? The problem with that approach is that it is sometimes difficult to tell whether the increase in memory was because of an individual session or additional objects as well...
We run on
Tomcat, and our script for installing Tomcat as a service has the options -server -Xmx1536m -Xms1536m. This is on a machine that has 3MB of memory, and I understand that the last two refer to the initial and max heap size and that the JVM can't go much higher than either 1.5MB or 2MB or something like that. I'm not entirely clear on whether we would always want to jumpstart the initial heap size to the max heap size. Anyway, I have heard that sometimes multiple Tomcats are run on a server, and I'm assuming that there's one VM per Tomcat, so I'm wondering if this is done to reduce the heap size for each one to give better performance on each. It seems like it'd be ideal to run one Tomcat with a huge VM heap size per machine to reduce complexity, but if we need to change this, then we'll have to learn this stuff!
Thanks for any advice...