|
|
|
Back to newsletter 228 contents
Bye Bye CMS. JEP 363 (Remove the Concurrent Mark Sweep (CMS) Garbage Collector) has been applied in the draft Java 14, so there will no longer be the Concurrent Mark Sweep garbage collector available.
Though it was never the default collector, for a decade it's been the collector of choice for applications that needed good pause time handling (eg anything customer facing or latency sensitive). But it was always a massive pain to tune properly, with way too many tuning flags; even getting the tuning right left it fragile, needing re-tuning when the application was upgraded or the throughput pattern changed or increased; and critically it suffered from fragmentation that you desperately needed to avoid or you would get a huge long (many seconds) pause. My own advice for CMS was to do a basic level of tuning, determine the interval between defragmentation GCs, and take instances out of the cluster more frequently one at a time, do an explicit full GC, then put them back into the cluster.
So with CMS gone, what are your options from Java 14 on? Well as I pointed out in my September newsletter you still have 11 other collectors to choose amongst so you're not exactly lost for choice. A good percentage of applications can transfer to G1 and gain similar pause statistics to CMS. But a significant number will see an unacceptable degradation from switching to G1. These should try out the low pause collectors: ZGC, Shenandoah, metronome, gencon+concurrentScavenge, optavgpause. But do note, the lower the pause you need, the higher the memory and additional (non-application) CPU you need to provide.
Now on to this month's tips, tools, news, articles and talks. And of course the tips from this month's articles and talks, as ever are extracted into this month's tips page.
Java performance tuning related news.
Java performance tuning related tools.
Back to newsletter 228 contents