Skip to content

build: significant build cache size increase on tip #71667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cherrymui opened this issue Feb 11, 2025 · 4 comments
Closed

build: significant build cache size increase on tip #71667

cherrymui opened this issue Feb 11, 2025 · 4 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@cherrymui
Copy link
Member

$ mkdir /tmp/cache1.24
$ git checkout go1.24.0
$ GOCACHE=/tmp/cache1.24 ./make.bash
...
$ mkdir /tmp/cachetip
$ git checkout master && git pull
$ GOCACHE=/tmp/cachetip ./make.bash
...
$ du -sh /tmp/cache*
 39M	/tmp/cache1.24
663M	/tmp/cachetip

(This is on darwin/arm64. Other platforms might be similar.)

This is concerning.

@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. compiler/runtime Issues related to the Go compiler and/or runtime. labels Feb 11, 2025
@dmitshur dmitshur added this to the Go1.25 milestone Feb 11, 2025
@prattmic
Copy link
Member

I planned to start a bisect, but even 9da530f has a big cache, even though it should be very similar to 1.24.

@cherrymui
Copy link
Member Author

Interesting. Apparently if I create a dummy VERSION file at tip, the cache size backs to 39M.

I'll see what the cache size is before without a VERSION file.

@prattmic
Copy link
Member

FWIW, if I do GOCACHE=<tmp location> go build cmd/compile at go1.24.0 and 9da530f, both have identical cache size (169MB). Not sure why that is bigger than make.bash for 1.24...

@cherrymui
Copy link
Member Author

With Go 1.23.0, if I remove the VERSION file, I got 599M. Smaller than tip, but not too much.

cmd/dist does different things depending on whether we have a VERSION file https://cs.opensource.google/go/go/+/master:src/cmd/dist/build.go;l=1586 .
If we have one (e.g. for a Go release), it uses GOROOT/pkg/obj, which then get deleted at the end. If not, it uses the actual GOCACHE.

So I guess actually there is no big increase. Maybe there is some builder issues...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants