BT

JVMs Across the Data Center and Twitter's JDK

| by Dylan Raithel Follow 9 Followers on Nov 08, 2016. Estimated reading time: 2 minutes |

The sponsored solutions track at QConSF2016 features talks from Twitter. Yesterday, Twitter’s JVM team announced their work on developing, releasing and maintaining the company’s own JDK distribution based on a fork of the OpenJDK. It currently supports OSX and Linux, with releases scheduled once a month, or at shorter intervals for emergencies. Twitter’s John Coomes noted similarities between Twitter and how their approach to forking OpenJDK is analogous to what the Oracle-JDK is in terms of a divergent featureset from OpenJDK. When asked about the degree to which Twitter attempts to merge in upstream changes from OpenJDK changes, Coomes noted that it depends on the release feature set and that it’s not necessarily part of their strategy to maintain a tight coupling to the OpenJDK master.

Some of the new feature Coomes noted in Twitter-JDK are extended heap profiling, asynchronous garbage collection (GC) logging, a binary logging framework dubbed Contrail, intermediate generations for G1, additional APIs and command-line arguments, performance improvements and bug fixes. The Twitter-JDK improvements are contributed upstream when possible.

Coomes noted some of the existing problems in the JVM, specifically around long GC pauses and some of the ways in which one can manage long pauses on OpenJDK. One approach is to segregate I/O intensive and latency sensitive jobs. This is tedious though when there are thousands of Twitter services running on mostly Scala and Java. JVM I/O can be turned off during safepoints, but this results in decreased ability to monitor the JVM. Coomes noted deprecation of Python-based services in favor of JVM-based languages, inferring the number of JVM-based services at Twitter is only going to go up. The Twitter-JDK handles some of these challenges by implementing asynchronous GC logging and jvmstat. This results in pauses no longer blocking I/O. Coomes noted the future potential release of Contrail, a utility for asynchronous log GC with a JIT compiler, runtime and stack trace support. Twitter-JVM tuning implements Bayesian optimization, a technique borrowed from machine learning so that the JVM can learn potentially noisy cost functions iteratively, efficiently, and resulting in faster discovery of optimal processing paths.

In terms of deciding what parameters to tune in the Twitter-JDK’s VM, Coomes noted there are too many parameters, around thirty, to choose from for addressing optimization scientifically. The cost function used to measure the VM’s performance is the number of request per second over the wallclock time spent in GC. Twitter ran the new VM in staging with minimal iterative testing of 70 cycles for 30 parameters, with a reported performance improvement of 182 percent. Future work entails stress-testing or red-lining, longer experiment durations, concurrent experimentation with Mesos, and the ability to detect and terminate poorly performing experiments early.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT