Friday, February 25, 2011

Benchmark clojure/JVM: 5 degrees of freedom

1. Hotspot warmup/ caching

"-XX:CompileThreshold=10000"



2. Hotspot's startup time. tradeoff: "-server" perf, "-client" startup time

nailgun

JRebel


3. Combinations of default heap "-Xmx" and GC algorithm

http://groups.google.com/group/clojure/browse_thread/thread/9b2915f7517c2c0b

"-XX:+UseG1GC:"; "-XX:-UseParallelGC"

N.B: he first sets minimum heap to get correct program behavior.


4. Max inlined function size, "'-XX:MaxInlineSize=100"

Rich Hickey likes "100"

"-Xincgc -XX:-DontCompileHugeMethods -XX:MaxInlineSize=1024 -XX:FreqInlineSize=1024 "




5. JRockit can be slightly better or a lot worse:
OpenJDK, also
[[ need citations ]]


Prior Art:
Jensen, "Get Benchmarking Right"

monitor GC: "java -verbosegc"

Nutter the JRuby guy: Favorite hotspot options

G1 GC experimental ; ParallelGC or CMS safer for production (july 09)