News: Concurrent garbage collection in Java
The parallel garbage collectors in Hotspot are designed to minimise the amount of time that the application spends undertaking garbage collection, which is termed throughput. This isn't an appropriate tradeoff for all applications - some require individual pauses to be short as well, which is known as a latency requirement.
- Posted by: Richard Warburton
- Posted on: May 07 2013 17:10 EDT
The Concurrent Mark Sweep (CMS) collector is designed to be a lower latency collector than the parallel collectors. The key part of this design is trying to do part of the garbage collection at the same time as the application is running. This means that when the collector needs to pause the application's execution it doesn't need to pause for as long.
Full article at: http://insightfullogic.com/blog/2013/may/7/garbage-collection-java-3/
Moving forward, the Java team is focusing primarily on the G1 collector, which for many applications is already on par with CMS performance. In Java 8, the Hotspot JVM also eliminates the "perm gen" requirement. These two things together make Java 8 a pretty attractive move.
Cameron Purdy | Oracle
The opinions and views expressed in this post are my own, and do not necessarily reflect the opinions or views of my employer.
It would be even better if G1 abandoned logging of GC event reporting altogether for something more modern that could be plugged into a higher order control system based on adaptive valves that use such information via sensors to power more effective workload controllers. This issue came up during my "Signals & Boundaries" talk at JavaOne India just this week. Hopefully I will have a blog out later in the week that looks at this and why logging (both reading and writing) is so wrong beyond the simplest of web apps. http://www.jinspired.com/research/adaptive-control-in-execution
Thanks for your reply. I'm currently going through most of the major collector algorithms on my blog - so I've already covered the Parallel Young + Parallel Old combination and CMS. I plan to do G1 next. G1 isn't used anywhere near as much as CMS in production systems, so I picked writing about CMS first. As you say people should try G1, but if they blindly use it simply because its the 'latest thing' rather than because GC Logs suggest that its a better choice than CMS they aren't doing doing themselves or their employers much of a favour.
I'd love to get your feedback on G1. Let me know what you find. You can get to me directly at my first dot last name at my employer dot com (see below). Peace, Cameron Purdy | Oracle