Brook,

At first glance, I'd say you need a consultant like Charlie Arehart (
http://www.carehart.org/) to see why your application is performing like
this. Usually, there is a way to fix the offending memory hole. If you think
you can do it, hire Charlie for an hour or so and he will give you some
pointers. If your staff doesn't have the talent he can probably fix it
completely. There are some alternatives to that plan including hiring Adobe
support, or find and hire another expert. Some names that come to mind with
deep server experience are Mike Brunt & Steven Erat.

Ok, back to your problem.

1. Windows task manager reports used memory by default, not allocated
memory. Turn on the Virtual Memory Size column in task manager and you
should see the full amount.

2. I don't really know about SeeFusion and what it reports on. Maybe ask
them about it?

3. It sounds like the request is still running even though the browser
request has ended.

I think overall what you need to do is fix the offending code. You have a
memory leak. It's not ColdFusion, it's not the server, it's your CFML. I
would guess that the client storage / array looping operation is a pretty
hairy one. Move your client storage into actual database tables and columns
and turn off client variables. Think about how you may be able to pre or
post-process some of the long-running operations. Run them on a different
server. If you have a lot of database operations, cut them down. If you have
a lot of components, cut them down.

Oh, and good luck.

nathan strutz
[http://www.dopefly.com/] [http://hi.im/nathanstrutz]


On Fri, Dec 3, 2010 at 10:51 AM, Brook Davies <[email protected]> wrote:

>
> Hello,
>
>
>
> I have a question about a memory usage pattern that I am trying to figure
> out. I am using seefusion to watch our server and this is what I am seeing:
>
>
>
> 1.       We have two webservers and a loadbalancer with equal distribution
> and sticky sessions enabled
>
> 2.       Memory usage will be constant around 20%-30% in use throughout the
> day.
>
> 3.       When I check the taskManager on the machine I see jrun using only
> 300-400 megs.
>
> 4.       The arguments to the JVM are  -Xms1024m -Xmx1024m
> -XX:MaxPermSize=384m -XX:+UseParallelGC
>
> 5.       The app uses client variable storage with a MSSQL database backend
>
> 6.       The client variable data per client (in some edge cases) can grow
> to be very large
>
>
>
> What I am seeing is a specific customer comes along and  uses our app  and
> they have some very large strings of data stored in the client scope and
> invoke some operations that do a lot of array processing on large arrays.
> These requests are big and slow. We see a big spike in the memory usage. It
> continues to grow and grow.  Then the client appears to disconnect and
> leave
> the website (in fact, we verified by banning their IP to test). But the
> memory never gets released. The task manager now reports jrun up at over 1
> gig of memory.
>
>
>
> We have a script that runs every 30 seconds that checks memory usage and
> does a full GC when less than 100 megs of memory remain. Prior to
> implementing that script, we were seeing some out of memory errors.
>
>
>
> While watching seefusion we can see the memory creep up to 90%+, and then
> to
> 10% when the GC script runs.  But it immediately begins to climb again. And
> this process repeats. The traffic on this server is no different than our
> other server which sits  at 19% memory usage.  Now, if we restart CF, the
> problem goes away, and memory usage stays at under 20%.
>
>
>
> My questions are:
>
>
>
> 1.       I understand that setting -Xms1024m -Xmx1024m should immediately
> allocate that amount of ram to the JVM. So why does the taskManager report
> the memory usage at 300 megs (prior to the event)?
>
> 2.       If a bunch of requests cause memory usage to spike and then those
> requests die off, should seefusion show memory usage at 90% because thats
> whats allocated to the JVM and now 'claimed'? So would that be a normal
> operating condition?
>
> 3.       What would cause the memory to immediately climb back up after a
> full GC after 'something' happened but not climb after the service is
> restarted?
>
>
>
> Thanks for your insights guys!
>
>
>
> Brook
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339772
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to