Various GC Collectors
| Collector | Function | Recommended for | How to enable |
| Serial Collector | Uses 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 Application | Applications that cannot tolerate longer GC pause times | -XX:+UseConcMarkSweepGC |
| G1 Collector | Strives to collect from Heap regions that have the most garbage | Most enterprise class applications. Through testing required before implementing. | –XX:+UseG1GC |
No comments:
Post a Comment