On 11.09.2015 18:24, Caldarale, Charles R wrote:
From: Leo Donahue [mailto:donahu...@gmail.com]
Subject: Re: heap thrashing

I see this topic come up from time to time on the list.  Can someone point
me to what heap thrashing looks like?

Is heap thrashing a very "closely spaced" saw tooth pattern?

Should have mentioned that "heap thrashing" does not have a strict definition.  
Often, it's used to describe the heap itself expanding and contracting in a cyclic 
manner.  This is most easily avoided by setting the min and max heap size limits to the 
same value.

What you have appears to be just very rapid object creation and garbage 
collection.  Using a larger heap (if you have the RAM for it) could help to 
reduce the frequency of collections.  Fixing the webapp to not consume so much 
space would be better, of course.

  - Chuck

In terms of looking at the webapp code which may generate that kind of behaviour, while searching for an example on the www, I came across this blog post :

http://steve-yegge.blogspot.de/2006/03/execution-in-kingdom-of-nouns.html

Independently of what one may think about the author's opinions and treatment of the matter, I find the prose beautiful and witty. The pseudo-java code example is of course tongue-in-cheek and contrived, but I have seen similar code in the real world, and it would probably produce the kind of phenomenon which Leo is seeing.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to