Fury Java Benchmark contains benchmarks for:
Part of benchmark data is based on Kryo benchmark. Kryo benchmark suite is based on Kryo benchmark.
# Install fury cd ../java && mvn install -DskipTests && cd - # build benchmark jar mvn package # run benchmark nohup java -jar target/benchmarks.jar -f 5 -wi 3 -i 5 -t 1 -w 3s -r 5s -rf csv >bench.log 2>&1 & java -jar target/benchmarks.jar "io.*\.deserialize$" -f 1 -wi 1 -i 3 -t 1 -w 2s -r 2s -rf csv
cd .. && mvn -T10 install -DskipTests -Dcheckstyle.skip -Dlicense.skip -Dmaven.javadoc.skip mvn exec:java -Dexec.args="-f 3 -wi 5 -i 15 -t 1 -w 2s -r 2s -rf csv"
See org.openjdk.jmh.runner.options.CommandLineOptions for more information about jmh options:
-f fork -wi Number of warmup iterations to do. -i Number of measurement iterations to do -t Number of worker threads to run with. -w Time to spend at each warmup iteration. -r Time to spend at each measurement iteration. -rf Result format type
Save benchmark data to specified dir, then run tool.py to plot graphs.
Fury uses pandas to process the jmh data, and uses matplotlib for plotting.
pip install pandas matplotlib python analyze.py
Using async-profiler to generate flame graph.
export pic=s1.html
nohup java -jar target/benchmarks.jar 'io.*Fury.*deserialize*' -f 1 -wi 1 -i 1 -t 1 -w 1s -r 35s -rf csv &
profiler.sh -d 30 -f $pic `jps | grep ForkedMain | awk '{print $1}'`
-XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining to inspect jit: java -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining -jar target/benchmarks.jar io.Fury. UserTypeBenchmark.serialize -f 0 -wi 1 -i 1 -t 1 -w 1s -r 35s -rf csv > compile.logjava ${other_options} -XX:+PrintFlagsFinal -version, should include all other options on the command line because some options affect others, particularly when setting GC-related flags.jcmd $pid VM.flags -all -XX:FreqInlineSize= flag specifies the maximum number of bytecode instructions to inline for a method. The default value depends on the platform – for 64-bit Linux, it's 325.hot method too big need to be optimized.