One of the key strengths of JVM is automatic memory management (Garbage Collection). Its understanding can help in writing better applications. This becomes all the more important as enterprise server applications have large amount of live heap data and significant parallel threads.Until recently, main collectors were parallel collector and concurrent-mark-sweep (CMS) collector. This paper introduces the various Garbage Collectors and compares the CMS collector against its replacement, a new implementation in Java7 i.e. Garbage-First (G1). It is characterized by a single contiguous heap which is split into same-sized regions. In fact if your application is still running on the 1.5 or 1.6 JVM, a compelling argument to upgrade to Java 7 is to leverage G1.
Gurpreet S. Sachdeva is Director – Technology at Aricent Group. He has 16 years of experience working on Enterprise Computing technologies and Communication Network Applications. A keen Java enthusiast, has worked in Java EE Technology with almost every major application platform ranging from Tomcat to Jboss, Oracle Application Server and WebLogic.