RE: CFMX memory usage under load : is this normal?

2007-06-05 Thread Dave Watts
 ... but I'm wondering if this is 
 symptomatic of a memory problem/leak somewhere ...

No, as long as memory used doesn't increase over time.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

This email has been processed by SmoothZap - www.smoothwall.net


~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7  
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280170
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFMX memory usage under load : is this normal?

2007-06-05 Thread James Holmes
Yes this is normal. Our busy SPARC server has a 2.5 GB JVM and frees
over 600MB when it does a GC. It does this at roughly 30 second
intervals or so, like your figures show.

On 6/6/07, Terry Ford [EMAIL PROTECTED] wrote:
 I've never actually paid much attention to CFMX's memory usage before, but I 
 just started monitoring our memory, and I'm a little unsure whether what 
 we're seeing is normal or not.

 Setup: CFMX6.1, linux ES4, 800MB Xmx.  Server averages 30 templates/second.
 Cached queries set to 0 (same thing happens for different values of cached 
 queries anyway).  I'm noticing the same behavior on CF8 pub beta.

 Monitoring java.lang.Runtime.getRunTime()'s freeMemory()

 Here's a sample of our free memory output at 5 second intervals:
 493mb
 356mb
 66mb
 66mb
 59mb
 350mb
 57mb

 Over the course of a minute, the free memory value is flying all over the 
 place.  It dives down to 50mb or so, and then I assume the GC cleans up and 
 it's back up in the 350+s.  Then it drops rapidly back to 50mb, and flies 
 back up again.

 The app is not doing anything that I'd consider memory intensive.  Lots of DB 
 queries, but none are that large memory wise.  100 rows here, 2 rows there, 
 but done many times each minute.

 There is no notable strain on the server (pages load fast, server load avg is 
 low), but I'm wondering if this is symptomatic of a memory problem/leak 
 somewhere, or if it's completely normal for a loaded server to be allocating 
 and freeing memory at such a frantic pace.


-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~|
ColdFusion MX7 and Flex 2 
Build sales  marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280198
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFMX memory usage under load : is this normal?

2007-06-05 Thread Terry Ford
Thanks. 

I guess the developer in me isn't quite comfortable with so much temporary 
object creation and destruction.  CFMX pools db connections and threads; why 
not pool query objects, instead of instantiating new ones on each request? 

Looks like the JRE creates and destroys new query objects for every single 
request that touches queries, creating lots of memory garbage.  Easy to show 
this by performing queries and printing free allocated mem after each. 

I would think that a more efficient method would be to have a query object pool 
that gets allocated once and used by threads on demand (you'd have to bound 
query result size).  That way you could reuse the same query objects and take 
pressure off the GC.

Surely your application doesn't really need to temporarily allocate and free 
600MB of memory every 30 seconds?  Or is this object-creation-happy use of 
memory cleaned up by the GC actually more efficient than reuse would?

The current usage of memory just seems wrong to me.


Yes this is normal. Our busy SPARC server has a 2.5 GB JVM and frees
over 600MB when it does a GC. It does this at roughly 30 second
intervals or so, like your figures show.

On 6/6/07, Terry Ford [EMAIL PROTECTED] wrote:


-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280200
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4