[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    RE: Memory pool "Survivor space"
From:       "Caldarale, Charles R" <Chuck.Caldarale () unisys ! com>
Date:       2008-11-30 16:23:04
Message-ID: 0AAE5AB84B013E45A7B61CB66943C17215A3DCF423 () USEA-EXCH7 ! na ! uis ! unisys ! com
[Download RAW message or body]

> From: André Warnier [mailto:aw@ice-sa.com]
> Subject: Memory pool "Survivor space"
> 
> This Tomcat's JVM is started with the switches "-Xms200M
> -Xmx200M"

That's rather small for these days; I presume this is the toy machine you use to test \
with.

> In the "memory" tab of jconsole, I observe that one of the display
> sections (Survivor space, the middle bar in the "Heap" section),
> has the following behaviour :

All of your observations seem perfectly normal.

> - what does this mean ?

It means things are running properly.  Objects are born in Eden, live ones migrate to \
a Survivor space on each minor collection ("Copy", on the JConsole picture), and \
reach Tenured only after staying in a Survivor space for some amount of time.  When \
Tenured fills up, you'll see a major collection ("MarkSweepCompact").

> - where does the JVM get this apparent hard limit of 2 Mb for
> this pool size ?

The initial value is calculated during JVM initialization, and adjusted as needed as \
the JVM runs.

> - does it matter ? I mean, assuming I could change it, would
> that have an impact in how the JVM works while starting this
> application, and how ?

Yes, there are command line parameters to play with this (-XX:SurvivorRatio being the \
primary one for this area of the heap), but you will likely only make things worse.  \
Without faster, multiple CPUs and more memory, you're not likely to reduce the 1 \
minute spent in garbage collection during webapp initialization by any significant \
amount.  Rewriting or reconfiguring the webapp to be more efficient (including not \
creating so many objects) would buy you a lot more.

> - if I use <load-on-startup> in the web.xml of this application (no
> matter with which value), then it seems to get started when Tomcat is
> started.

Which is what <load-on-startup> is defined to do.  The value setting applies only to \
order servlet initializations within a single webapp; it is not a global value.  \
Tomcat initialization is serial, including processing any servlets marked with \
<load-on-startup>.

> - if I do not have a <load-on-startup> tag in web.xml, then Tomcat
> prints "server startup in .... ms" in catalina.out, and becomes
> responsive in about 15 seconds (instead of 5 minutes).

Also expected, since your webapp's initialization is now deferred until the first \
request for it.  Since the system you're running on has less processing power than my \
phone, and your webapp seems to be a bit on the heavy side, it's going to take a \
while, regardless of when it happens.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and \
is thus for use only by the intended recipient. If you received this in error, please \
contact the sender and delete the e-mail and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic