Skip to content

IO Block Request Analysis

Min Zhou edited this page Jul 8, 2015 · 2 revisions

Download the example jar file

wget http://blog.minzhou.info/perfj/leveldb-benchmark.jar

Run java program with frame pointer preserved

java -cp leveldb-benchmark.jar  -XX:+PreserveFramePointer org.iq80.leveldb.benchmark.DbBenchmark  –benchmarks=fillrandom  –num=100000000

Profile io request by PerfJ

bin/perfj record -e block:block_rq_issue -F 99 -g -p `pgrep -f DbBenchmark`

After a while use Ctrl+C to terminate the profiling. You will see a file named perf.data in the current working directory.

bin/perfj  report --stdio
Clone this wiki locally