Skip to content

Precompile gitlab-workhorse

Kev Kloss requested to merge kkloss-precompile-gitlab-workhorse into main

What does this merge request do and why?

This MR adds support for precompiled gitlab-workhorse binaries.

Related to #2127 (closed)

Performance

On my M3 MacBook, it’s about 12 times faster to just check if we have to redownload again. At my 100 MBit/s download, it takes about 14s to download, which is still 40% faster than compiling here (probably much faster on lower-end devices) and should only run whenever we update our precompiled binaries.

Benchmark 1: make gitlab-workhorse-update-run
  Time (mean ± σ):      1.649 s ±  0.158 s    [User: 0.529 s, System: 0.237 s]
  Range (min … max):    1.357 s …  1.799 s    10 runs
 
Benchmark 2: make gitlab-workhorse-update-run-old
  Time (mean ± σ):     20.673 s ±  0.402 s    [User: 9.647 s, System: 23.004 s]
  Range (min … max):   20.174 s … 21.514 s    10 runs
 
Summary
  make gitlab-workhorse-update-run ran
   12.54 ± 1.23 times faster than make gitlab-workhorse-update-run-old

How to set up and validate locally

By default, you can just run GDK_SELF_UPDATE=0 gdk update and it will download the precompiled binary if it’s available for your platform. If not, it’ll fall back to compiling locally.

  1. Run gdk download-precompiled
  2. See that files are being downloaded
  3. Run gdk download-precompiled
  4. See that all files are up to date
  5. Rerun the precompile:gitlab-workhorse job
  6. Run gdk download-precompiled
  7. See that files are being downloaded again

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Kev Kloss

Merge request reports

Loading