pprof-breakdown

Stars
5

pprof-breakdown

This repo contains the code and data used to analyze the efficiency of the pprof breakdown proposal.

Methodology

This project attempts to quantify the efficiency of a proposed change to the pprof format that adds a new breakdown field to the Sample message in order to store timestamps, values and labels for individual events.

The data is generated by executing make pprof-inputs pprof-outputs which causes the execution of a few toy workloads that generate pprof CPU profiles. The CPU profiles are generated using a fork of Go that implements the breakdown proposal.

After the initial files are generated, a few variants of them are generated. The label variants convert the breakdown inputs to using the existing label mechanism in pprof. Additional variants with and without compression are generated.

The results are best viewed in this spreadsheet.

For the individual workloads, see ./testdata/workloads/workloads.go and ./testdata/workloads/main.go.

Alternatively you can take a look at the files in testdata/pprof-inputs and testdata/pprof-outputs, perhaps using protoc:

cat testdata/pprof-outputs/printf-10s.none.breakdown.pprof | protoc --decode perftools.profiles.Profile /path/to/profile.proto

Reproduce Results

If you're interested in reproducing the results, please:

  1. Build this fork of Go which adds the pprof breakdown feature to the CPU profiler

  2. Run the code below:

PATH="/path/to/github.com/felixge/go/bin:$PATH" make pprof-inputs pprof-outputs