Include symbols in docker-machine binary
On a recent profile, docker-machine
was taking up ~20% of total CPU on a shared runners manager (gitlab-runner taking 45%).
Because we strip these binaries, a perf record
doesn't tell us where the CPU time is going. We recently fixed this in gitlab-runner
: gitlab-org/gitlab-runner!2800 (merged).
Flamegraph from a 10 second perf-record on shared-runners-manager-3.gitlab.com
:
As you can see, we don't know what the stack frames are referencing. We don't know where the CPU cycles are being spent.
By removing the -s
flag, we no longer strip the binary. That will allow us to use CPU profiling to identify optimization opportunities.
See also: gitlab-com/gl-infra/production#3617 (closed), and https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/12315.