tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier (tomcat)>
Subject Re: heap thrashing
Date Sat, 12 Sep 2015 12:49:18 GMT
On 11.09.2015 18:24, Caldarale, Charles R wrote:
>> From: Leo Donahue []
>> 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 :

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:
For additional commands, e-mail:

View raw message