Skip to content

GitLab Next

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
GitLab FOSS
GitLab FOSS
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 0
    • Merge Requests 0
  • Requirements
    • Requirements
    • List
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #59477

Closed
Open
Opened Mar 25, 2019 by Stan Hu@stanhuOwner

Repository fetches should pack loose objects and refs

Numerous customers have seen performance issues largely due to a git fetch keeping around loose objects and refs. For example, after a GitHub import with 20,000 pull requests, we created about 50,000+ keep-around refs, all of which were loose refs.

When GitLab attempts to read the refs, it has to read thousands of loose files, and this takes a long time. Running a git pack-refs --all dramatically made things faster.

We should run git gc and git pack-refs --all after a fetch. I know that ~Geo encountered this a while ago in https://gitlab.com/gitlab-org/gitlab-ee/issues/5447. It looks like we only fixed this for Geo in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5261.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: gitlab-org/gitlab-foss#59477