(Message Rejected: Reposting)Dave, Here's a few replies to your followup.
If I don't make sense, blame it on NYPD Blue :)

JRun metrics provide a simple view into the number of sessions and the
amount of memory allocated and free, and you might want to use this before
deciding to enable the more robust GC logging.  In a bottleneck situation
you might see a sudden rise in the number of sessions, and if the app has
reported memory errors you might see the allocated memory grow or remain at
the max heap size paired with a decreasing value for free memory, where heap
allocated - heap free = heap used.  The jvm typically has more heap
allocated than used, within the confines of the max heap size.

GC logging output can be mildly cryptic at first glance, but with a brief
review of some public explanations on the topic, one could find it very
helpful to rule out (or in) certain possible suspects involved in server
crashing or slow down.  For example, heap size is printed out and with a
little accounting it can be determined if the application is close to the
max heap limit or not, and trends in memory usage can be estimated to
determine if there are periods of memory usage where it is accumulated
gradually and released or if it was rapidly  acquired in a short burst.  A
graph of memory usage can paint a profile of the application's behavior and
reveal areas or times of interest that might be correlated to specific
application or user events.  The logging of GC timestamps can be used with
the GC times to determine if GC behavior itself is a bottleneck where, for
example, rare circumstances on single CPU machines a lengthy GC could queue
up requests since no jrpp threads can run during GC, IIRC.  (I think on
multiproc servers GC can occur on one cpu while threads run on the other,
but I'm not sure right now). If that were the case, then there are GC
switches to add to the JVM arg list that which modify GC behavior in a way
that might benefit the app (thru trial & error).

Both JRun metrics and GC logging are of refined diagnostic utility, but by
themselves they won't actually indicate what application code or behavior is
the root cause. 

http://www.petefreitag.com/articles/gctuning/
http://www.ferdia.org/blog/index.cfm?data=20040513
http://www.macromedia.com/special/under_the_hood/report3/
http://www.macromedia.com/support/coldfusion/ts/documents/cfmx_perf_tips.htm

The HotSpot crash logs usually provide two specific, useful pieces of
information - the exact point of failure, sometimes too precise to
intuitive, and the error code. I haven't seen any crash logs referencing the
JDBC-ODBC bridge.  Otherwise, the failure might be a library call to Native
Code for example, such as when a crash occurs when calling a C++ CFX tag
(including Verity via libCFXNeo.dll/so).  The error code is best used when
fishing on the Sun Bug Parade.   This public facing bug base is often
littered with recommendations and advice from Sun engineers, as well as
collective input from the community.  Sometimes you find actual fixes or
workarounds. 

Assuming a code review has been performed to maximize efficiency, leaving
application design worries aside, one approach towards garnering the optimal
heap settings might be to load test the application on hardware with
abundant resources, while initially setting a very comfortable heap size.
Once the test is underway a memory profile would be established and it might
become obvious that the memory high water mark is nnn MB.  You can then
confidently run the application on similar hardware with a min heap setting
roughly equal to the average heap size discovered during the load test and
the  max heap equal to the high water mark plus 10 or 20% to be safe.  An
additional consideration would be to make sure that there is sufficient
memory on the machine to accommodate the application memory requirements
(high water mark + buffer), such that the application uses no more than say
~70% total real memory on the server. 

I believe there is one camp that recommends setting the min and max heap
sizes equivalently due to some degree of performance overhead when the JVM
dynamically adjusts the heap size at runtime.  There is another camp that
recommends the min heap be set equal to the expected mean memory requirement
and the jvm will have to do very little heap resizing other than momentary
occassions where more is needed. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185275
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to