Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • gitlab-runner gitlab-runner
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 3.5k
    • Issues 3.5k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 93
    • Merge requests 93
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • gitlab-runnergitlab-runner
  • Issues
  • #25801
Closed
Open
Issue created May 22, 2020 by Erik Lindahl@erik.lindahl

Improve cache upload speed on high-speed networks

Release notes

  • The related merge request that addresses this issue disables transport-layer compression in gitlab-runner cache_client.go

Summary

Well, perhaps not a strict bug, but definitely a major performance degradation that seems unnecessary :-)

I have been trying to diagnose slow cache operations, and after hacking the gitlab-runner-helper binaries with more timing information I found that the download part of the cache_extractor operations can be extremely slow. This appears to be do to a combination of small buffers and the Golang built-in version of http not being optimized for bandwidth.

Steps to reproduce

  • Add timing operations around the io.Copy() operation in routine download() of commands/helpers/cache_extractor.go.
  • Use a local S3 server, without SSL (to enable highest-possible performance).
  • When downloading a 931MB cache file with the 'mc' client outside of gitlab-runner, it takes 1.9seconds (10Gb network), so network and S3 server setup is A-OK.

Actual behavior

  • Gitlab-runner takes 42 seconds to download the same file.

Expected behavior

  • When I hack the code to use the Minio Golang package instead of presigned URLs + HTTP, the download takes 1.9 seconds in gitlab-runner too.

Environment description

  • Using our own runners in a k8s cluster
  • Ceph-backed radosgw S3 storage in the same cluster
  • No SSL to improve bandwidth

Used GitLab Runner version

13.1.0 (development)

Possible fixes

If there's interest, we could probably provide a MR to use Minio instead, although there could be some extra complications to handle GCS natively too.

Edited Dec 09, 2020 by Darren Eastman
Assignee
Assign to
Time tracking