Skip to content

The .git/ directory takes 4 GB per build on Fedora Stable x86-64 buildbot #789

Description

@vstinner

After seeing issue gh-788, I checked the size of the .git/ directory on the Fedora Stable x86-64 buildbot worker. It takes 4.1 GB, but this size is reduced to 274 MB after running gc gc.

bash-5.3$ du -sh .git
4.1G	.git

bash-5.3$ git gc
(...)

bash-5.3$ du -sh .git
274M	.git

I see that the "ARM64 Windows" and "wasm32-wasi" buildbots use a custom Git configuration to use a shallow clone:

            git_options=dict(
                # Do a full shallow clone for every build
                mode="full",
                method="clobber",
                shallow=True,
                # Disable the default, if set
                filters=None,
            ),

Should we use a shallow clone on all buildbot workers to reduce the .git/ size? Currently, we use:

                    # "git clean -fdx": remove all files which are not tracked
                    # by Git, ignoring the .gitignore rules (ex: remove also
                    # ".o" files).
                    mode="full",
                    method="fresh",
                    # Partial (blobless) clone: only fetch commit and tree
                    # objects, blobs are fetched on demand during checkout.
                    filters=["blob:none"],

cc @zware @stratakis

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions