tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Heap recommendations for Tomcat 7
Date Fri, 06 Sep 2013 20:54:48 GMT
Hash: SHA256


On 9/6/13 1:43 PM, John Beaulaurier -X (jbeaulau - ADVANCED NETWORK
INFORMATION INC at Cisco) wrote:
> Is there a good formula for JDK Heap parameters for Tomcat 7 as it 
> relates to hardware, or should ergonomics be allowed to define, or
> is it more application driven?

It's much more application-driven. I've been able to launch Tomcat in
a 12MiB heap when using a 32-bit JVM or a 64-bit JVM with compressed
OOPs. If you use a lot of JSPs -- especially ones that use many nested
custom tags -- then you may want to give yourself a bit of room for
the various buffers and caches of things that tend to accumulate under
those circumstances.

After that, everything is up to your webapp.

Another thing you have to watch out for is your PermGen space: if you
have many many classes being loaded (like for example if you use
Spring, which seems to load somewhere in the neighborhood of 100
million classes), then you'll probably need to expand PermGen. A
server I recently configured to run JasperServer (which happens to use
Spring) required me to increase the PermGen space from the default
(64MiB?) to 128MiB just to be able to run a very simple report, and I
have about 300KiB left, so I may have to go higher once we start
running lots of reports on it.

We comfortably ran our primary application in production with a 64MiB
heap for several years before we outgrew that. These days, we run with
a 512MiB heap due to increased usage, a switch to a 64-bit JVM, and
the availability of much more RAM (we started with 2GiB servers, now
we have 8GiB servers).

My recommendation is to set up some reasonable load tests and run
under different configurations. IMO, if having a huge heap isn't
necessary, then don't run with one.

> OS: RHEL 5.5 Kernel: 2.6.18-194.8.1.el5 Apache Tomcat: 7.0.39

You could use a slight upgrade. You should move up to 7.0.43 when it
comes out -- should be fairly soon.

> JDK: 1.6.0_45

JDK 1.6 is officially EOL (i.e. dead) so you should really move up to
Java 7 as soon as possible. If you get started soon, you might even
make it before Java 8 is released.

- -chris
Version: GnuPG v1.4.14 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


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

View raw message