Profiling overhead

Embed
Preview of the card
<a href="https://forumulate.com/p/watchtower/docs/profiling-overhead"><img src="https://forumulate.com/api/public/orgs/watchtower/spaces/docs/pages/96403478-6fd5-416e-8496-346af84cca3b/social-card.svg?v=3e7ae33eec8b" alt="Profiling overhead" width="600" height="315"></a>

Target: at most 2% CPU overhead at 19 Hz for the Go profiler (go/profiler). Profiling must not cost more than it finds, so the client cost is measured, not assumed.

Method

go/bench/profiles runs a CPU-bound loop for 3 s without the profiler and again with it (CPU profile only, uploads to a local no-op server), five times per rate. Overhead is the relative loss in loop iterations; the table shows the median of the five runs.

cd go && go run ./bench/profiles -doc ../docs/product/profiling-overhead.md

The command rewrites the table below in place. Run it on a quiet machine and commit the result with the machine description.

Results

Rate

Median overhead

Runs

19 Hz

to be measured

5

49 Hz

to be measured

5

99 Hz

to be measured

5

All three rows say "to be measured" until the owner runs the command; no number in this file is an estimate.

Server-side limits

Ingest is capped per project (default 60 profiles per minute, 5 GiB per day, see the profiling policy), request bodies are limited to 8 MiB compressed, and a decompression bomb is refused while streaming.

Updated