-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

James,

On 6/17/14, 2:21 PM, James H. H. Lampert wrote:
> We launch Tomcat from a CL program, with a command front-end, and 
> currently we have the defaults set to 512M for the minimum heap
> space, and 2048M for the maximum, running 7.0.47 or 7.0.54, and
> using the JVM at /QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit.
> 
> Any recommendations about heap size, particularly with bigger
> boxes?

It really all comes down to your application's requirements.

Generally speaking, if you are going to have a large maximum heap size
(e.g. 2GiB versus 0.5GiB), then you are better off just allocating the
whole heap at JVM launch by setting Xms=Xms. That way, the heap never
has to be re-sized and you'll avoid the delays associated with that
resizing. Once the JVM has allocated heap space, it won't give it back
to the OS, so eventually, if you need it, you're going to take the
whole heap anyway.

GC pauses are proportional to the number of live objects in the newer
heap spaces (e.g. eden) that get promoted to the older heap spaces. If
you generate a lot of garbage, it's okay: the GC isn't working much
harder to handle a large heap than a small heap. If you generate lots
of long-lived objects at startup, they will quickly be tenured.

So the question is how your heap gets used. It's the high- and
medium-longevity objects that really dictate how much heap space you
need. If you have very few long-lived objects (e.g. life of the JVM
process) then session objects are likely to dominate your heap. That
means that required heap space will be dictated by your user load (and
average session size).

If you don't have sessions, or you have very modest ones, then you
really don't have much to worry about.

Having a large heap means that GC will run less often all things being
equal. Less GC activity means a faster process overall. So, if most
objects are dying on the eden heap, then having a large heap can be
advantageous: you'll get fewer GC pauses leading to higher overall
performance.

You should really do some performance testing on your application with
different heap configurations and see what happens. Remember to have a
realistic load profile for testing. Simply logging-in over and over
again probably isn't enough. ;)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJToI8HAAoJEBzwKT+lPKRYiD8QALILc2aDVC48Kmtok+PYaGdQ
AO7sy3dwUYVGDlEHVM220UAVPSXxXMN1021qZkRJ50jEzFBUI6DnYXnslFh7WkpM
k8xuvTB6JO40L8gizLSQOPe5zDQm9Gyl0KGJ5ax6FBEiUSUN9x0t7eAdLNKdLXxi
3VRlqgv6C1GmUQCzFeHhrTvSfFxzVguIU+onhhw9W/o06rcBYBgAGomk8lATPwUy
Yvr7trGsYaTUtagdBhZg/dv0eUwi3M+TDoEBY0U0avyogA3Ez7Icawr6b+AqqYzq
u+RMSY7CEfqtnLGHl/GiW8hfT5y20W0fJ1gBJW0NOolykAVUn9nybE2GiXvV+mRr
wzSAYuq71VS6yGhirzKEEu+jZ2qaKuLRxIzmO/rjmyTy4fZZN5jw9zTckhhG/2K6
LlbubXSY6MD6riD5l3bBLmbK9j03zlK2zSFvL0adkVzJcqljQACdgngpkEaAmIup
EuMrCvKZVNWkOdsfHbtQZlBSwG72cg8SXN1o76DEZhIdtWttSX9LPvVfaYHDFhii
XMd/IT++Q8LkjqmTkJHHfWAJYSAZf24l6PoCYTrmjxf2TB1yaF41rlAQcgrcAWiE
0qfGzh2IkxI7I0+tpoi3dbHvCEqjPDkNxQtV+IbmO58rKzl5e5vyMdTsGLF7K+h8
NK/r1/nxLLF9/Dl5QB2X
=bS51
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to