[cfarm-users] GCC repository clones (was: gcc110 /home is now 98% full)

Segher Boessenkool segher at kernel.crashing.org
Fri Mar 8 01:25:15 CET 2024


On Thu, Mar 07, 2024 at 05:55:51PM -0600, Jacob Bachmeyer wrote:
> Segher Boessenkool via cfarm-users wrote:
> >But many, many of those are weeks out of date so almost certainly
> >completely useless.
> >  
> 
> I seem to remember that Git can use another local repository as a 
> "reference" when cloning a repository; objects present in the reference 
> repository need not be copied into the new repository and the reference 
> is read-only.

It can, but that is a bit dangerous (if one of the repos messes up, the
other does as well).  Yes, I have been hit by this (a few times), Git
is not bugfree; but the second time it was a disk failure, which caused
corrupted git trees.  Lots of fun when that magically shows up in more
than one clone.

It is extra chaotic if those repos are by different users, and/or stuff
is automated around it.

> Combined with Git's feature of using hardlinks to save 
> space between local clones when possible, perhaps cfarm machines should 

Even worse.  Don't do that.  Use Git refs ("soft links", mostly), if
you have to (but that still is a bit problematic).

The full GCC repo is smaller than a single trunk checkout, fwiw.

> Even just an annual "snapshot" would save most of the disk space needed 
> for a GCC clone.

Nope.  The repo does not take so much space.  It is the checkouts, and
the oodles of object files (w/ debug info!) that are created by a
bootstrap, that take most of the space.

If you want to save space, run "make distclean" (and perhaps "rm -rf */")
in people's GCC build dirs.


Segher


More information about the cfarm-users mailing list