Turning off JVM's "C2" compiler


Hello everyone,

I’ve read this interesting article about Linkerd tuning: https://buoyant.io/2016/06/17/small-memory-jvm-techniques-for-microservice-sidecars/

I wonder how can I turn off JVM’s “C2” compiler as the writer suggests? Do I have to build Linkerd by myself?


It’s a JVM runtime option. I believe setting -XX:TieredStopAtLevel=1 will disable C2. There’s a reference of lots of these flags here: http://jvm-options.tech.xebia.fr/

I don’t know what the latest JVM settings are that ship out of the box for Linkerd – this may already be set. Either way, you can pass additional flags by passing them in a LOCAL_JVM_OPTIONS environment variable.


Thanks! I’ll try it.

How can I verify C2 compiler is indeed not working after passing the argument?