Pages

Thursday, May 19, 2011

WAS GenCon Garbage Collection Policy


In WebSphere Application Server v8 that will be available from June 17 the default garbage collection policy has been changed to gencon.
You may wonder why this policy is now the default  ?

■ GenCon is good for transactional workloads: when the transaction is done, most of the objects are thrown away
■ GenCon is good for interactive workloads: short GC pauses mean high responsiveness
■ Many applications fit one of these models
■ Many common Java idioms create short-lived helper objects:
– e.g. StringBuffer / StringWriter,
– e.g. Enumerator / Iterator
■ A smaller collection area means a smaller working set, improving cache utilization
■ The young generation collector compacts as it collects, reducing fragmentation
■ It also tends to relocate objects so that related objects move closer together
– For example: a String and its char[] array, or a HashTable$Entry and its key.
– This can bring significant cache benefits

Things to be aware of when using gencon
■ Tenured objects are rarely collected (by design!) -- this can lead to objects living longer than
expected. A common case of this is class unloading
 ■ Similar problems exist for finalization and reference objects that survive long enough to be
tenured
■ Newspace overhead: since the young generation is divided into semi-spaces, there is
always a small amount of unusable heap

Please look at this presentation on Generational Garbage Collection: Theory and Best Practices on the UK WebSphere Users Group http://www.websphereusergroup.org.uk/wug/files/presentations/31/Chris_Bailey_-_Generational_GC.pdf



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.