Wednesday, 22 July 2015

Various GC Collectors



CollectorFunctionRecommended forHow to enable
Serial CollectorUses single thread for both minor and major collections. Simplest.Single processor machines-XX:+UseSerialGC
Parallel Collector (Throughput Collector)Uses multiple threads for minor collection.Multi processor machines, enterprise class applications-XX:+UseParallelGC
To enable Major parallel collection, add -XX:+UseParallelOldGC
CMS Collector (Concurrent Mark and Sweep Collector)Mostly performs GC simultaneously along with ApplicationApplications that cannot tolerate longer GC pause times-XX:+UseConcMarkSweepGC
G1 CollectorStrives to collect from Heap regions that have the most garbageMost enterprise class applications. Through testing required before implementing.–XX:+UseG1GC

No comments:

Post a Comment