Vagrant box used to prepare materials for my JVM in flames talk.
Environment:
- Java 8
- hermes-frontend module for testing
- Kafka 0.10.2 required by Hermes
- wrk2 traffic generator
Profilers & tools:
- async-profiler
- honest-profiler
- hprof2flamegraph to generate flamegraphs from hpl and hprof files
- perf-map-agent perf for Java; not included in talk
- FlameGraph library for
perf-map-agent
vagrant up
Hermes Frontend binaries and run script are located in /opt
. Everything should be run as root
.
To run Hermes Frontend use /opt/run-hermes.sh
. It can be also modified to change run arguments,
see commented out sections for ways to enable different profilers and measurement options.
All profilers are located in /opt/profilers
and are ready to use (compiled etc).
After Hermes Frontend starts, run in separate shell:
wrk -t5 -d20s -c20 -R1000 -L -s hermes-traffic.lua http://localhost:8080/topics/jvm-in-flames.topic
Warmup round generates 1000rps for 20 seconds.
wrk -t10 -d300s -c20 -R2500 -L -s hermes-traffic.lua http://localhost:8080/topics/jvm-in-flames.topic
Measurements round lasts for 5 minutes, generates 2500rps. Higher percentiles are very sensitive to any external activities, so best close all CPU-intensive apps like internet browser or IDE.
Sample results used in talk are in ./results
directory. Naming conventions:
vanilla
- no profilersjmx
: JVisual VM profiler connected via JMX from hosthprof-10
: hprof profiler with default sampling interval (10ms)hprof-100
: hprof profiler with sampling interval = 100msasync
: async-profilerhonest
: honest-profiler
Directories:
results/flamegraphs
: flamegraphs in SVG formatresults/hdr
: results from wrk2 traffic generator, compatible with HDR Histogram plotterresults/gclog
: GC logs