tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Tomcat 7 Per Instance Memory Footprint in Hello World App.
Date Tue, 15 Mar 2011 20:17:40 GMT
Hash: SHA1


On 3/15/2011 3:27 AM, Noah Cutler wrote:
> So, given that a running 32-bit JVM on Linux will require at least 1GB
> RAM, total memory usage will not be JVM footprint * num instances, but
> rather, JVM footprint + num instances?

Not necessarily. We also run under 32-bit Linux (happens to be Tomcat
6.0.32 but it's not that different) and have JVMs that run under 128MiB
of RAM when configured in a certain way.

Obviously, your -Xmx settings have a lot to do with how much memory will
be used, as well as the number of threads that are managed by the JVM, etc.

> The use case is transferring 20 client sites from LAMP stack to JVM +
> Tomcat 7 + MySQL + a Groovy.lang web framework I developed.
> Ideally I would separate client sites into tomcat instances, so as to
> isolate them from each other (i.e. redeploy/restart without affecting
> other instances), but that hinges entirely on the memory footprint.

Ideally, you should be able to deploy/redeploy individual webapps
without interfering with each other. If you have specific concerns, let
us know and we might be able to comment.

Running under a SecurityManager can certainly help protect webapps from
each other -- things like prohibiting System.exit, etc.

> I have 16GB RAM available but was only planning on allocating 4-6GB RAM
> for this project. Only a couple of the sites in question do significant
> load (read: have been running on LAMP stack with 2GB RAM for several
> years without issue)

We run each of our webapps in a separate JVM/Tomcat process to isolate
them from resource conflicts -- we don't want one app to OOME and bring
down the others, for instance.

If you have some webapps that are particularly memory heavy or you are
worried about, you can separate them and run the others together.
Certainly running everything together in a single VM will be more memory
efficient but they might interfere in various ways.

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message