Thanks for the reply Peter.  Which OS are you using?

Peter Lin <[EMAIL PROTECTED]> wrote:
ok, so your server has 2GB of ram or 2000Mb.

the memory usage may increase for several reasons, the
primary one is there's a slow leak in one of your
applications. This may be as simple as several objects
referencing each other. If they happen to result in
circular references, the garbage collector may not
reclaim the heap memory if the server is under
moderate load. Eventually the VM would garbage those
objects, but for the short term it would look just
like a leak.

Another possible cause is if the sessions are set to
never expire or expire in a very long time, like 1 day
or greater. In general, I profile my webapps and use
JMeter to simulate load. I strive for flat memory
usage under constant load. A simple thing like
clearing all the arrays or nulling references in a
object structure will insure the heap is garbage ASAP
instead of several minutes. Say I make an object model
for some data that has a hierarchical structure. Once
I'm done with translating the data into HTML, I clear
that object structure to make sure the heap is
garbaged efficiently. I hope that helps.

peter




--- tom ly wrote:
> I've got tomcat running on a Linux machine with
> 2000GB of RAM. The tomcat settings are
> JAVA_OPTS="-server -Xms1500M -Xmx1500M"; therefore,
> when i start Tomcat, I'll see free memory drop to
> about 500MB - which is expected. But, when tomcat
> is running and especially under heavy load the free
> memory continues to drop while buffer and cache
> rises. I understand that Linux places all used
> memory into the buffer and cache and puts it back to
> free memory when needed. But I'm confused as to why
> free memory would be used at all since 1500MB of
> memory has already been allocated to Tomcat. I
> mean, why isn't it pulling from it's own heap
> instead of consuming Linux's free memory?
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Movies - Buy advance tickets for 'Shrek 2' 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


                
---------------------------------
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2' 

Reply via email to