February 1, 2009 Leave a comment
Over the past couple of weeks I have digging into a JVM performance issue, specifically a process which would start off running fast and then slow down at some point.
Tracking the performance of the GC I was able to figure out that the tenured generation was getting swamped by a large allocation that would not let go causing GC to go into full GC over and over again thereby killing performance. Indeed the library I was using to parse sentences would allocate space in proportion to the size of the sentence, an always allocate up and never down, so over time it was inevitable that it would swamp the tenured generation.
Effectively the JVM was behaving like an operating system with too little memory and trashing.
The answer obviously is to prevent these unbounded allocations from happening.