Deploy Edge Delta with a Profiler

Deploy the Edge Delta Fleet with a profiler.

You can deploy the Edge Delta Fleet with a profiler. The Edge Delta Fleet is a Go-based binary that (when specified during deployment) can expose CPU and memory profiling information. This information can be useful to understand specific activity, such as understanding why CPU usage is high. After deployment, to obtain the data, you can run a command to download a report.

Deploy the Fleet with a Profiler

To deploy the Fleet with a profiler, follow the regular installation instructions for each Fleet type; however, you must add the environment variable PROFILER_PORT for port 6060.

  • Linux example
D_ENV_VARS=PROFILER_PORT=6060
  • Docker Example
-e "PROFILER_PORT=6060"

You can only add a profiler when you deploy a Fleet. You cannot add a profiler to an existing Fleet deployment.

Obtain a Profiler Report

You can view the profiler report and send it to Edge Delta for analysis.

  1. Run the following command to install pprof, which requires golang installed:
go install github.com/google/pprof@latest
  1. Run the following command to visualize pprof results:
pprof -web /tmp/cpu.pb.gz

For information on heap, run:

curl -sK -v http://localhost:8080/debug/pprof/heap --output /tmp/heap.pb.gz

For information on CPU, run:

curl http://localhost:6060/debug/pprof/profile?seconds=60 --output /tmp/cpu.pb.gz

For information on goroutine, run:

curl http://localhost:6060/debug/pprof/goroutine --output /tmp/goroutine.pb.gx