Christian Watt wrote:

> Pete,
>     So far this is what I have come up with.  Macromedia has had me
> running OptimizeIt from Borland.  I do not see any classes increasing in
> there memory consumption.  The only common thread I can see right now is
> that when the memory jump, Old Gen GC jumps as well.  Once the Old Gen
> returns to a normal level, the memory does not.
> Example:
> Memory : 125mb
> Old Gen: 10MB
> ----Spike----
> Memory: 806mb
> Old Gen: 231mb
> ---Old Gen Returns----
> Memory: 620mb
> Old Gen: 8mb

I think what may be going on here is that the JVM is just performing less GC's becuase it thinks it doesn't need to. What happens is the heap expands to 800mb or more during the traffic spike, then when things settle down it has all this memory avaliable, so it becomes less aggressive when it garbage collects. The garbage collector will only run when you need more memory on some GC algorithms. I would guess that it still has 800mb allocated in virtual memory space, in the third stage.

This is where your max heap size setting comes, if you have it set to 800mb the server may hang out at around 80% of that max heap size (depending on your settings) of this after being maxed. So if your not comfortable with your server taking up that much ram, you should lower your max heap size.

One thing you can try when you get to your third state there is to run the invoke garbage collector by hand, eg:

<cfset system = CreateObject("java", "java.lang.System")>
<cfset system.gc()>

See if that free's the memory, if not then that means that there are references to 600mb of objects, in which case I would suggest taking a look at your application, and making sure your not doing anything that would consume a lot of ram. I don't think your doing any heavy long term caching because your old gen size is small.

I don't think its very likley that there is a bug in the JVM causing memory not to be free'd, as that would be a major bug.

______________________________________
Pete Freitag
http://www.cfdev.com/
Author of the CFMX Developers Cookbook
http://www.petefreitag.com/bookshelf/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to