Skip to content

release: go1.10beta1 ships as: 2x the size of 1.9.1 due to pkg/obj/go-build files. go clean -cache does not shrink #23299

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
glycerine opened this issue Jan 2, 2018 · 4 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@glycerine
Copy link

go1.10beta1 darwin amd64

unpacking 1.10beta1 on my mac gives me a filesystem tree that it is 2x the size of 1.9.1, and contains alot of these go-build files, lots and lots of them (7569 files in this subdir). Is this intentional? What are these objects, and why are they taking up so much space and so many inodes?

screenfulls of this observed during un-taring:

...
x go/pkg/obj/go-build/b3/b3fa9cfff45325eacc11a5c3c3e037c18e612108960fb9cdec543cd2193616d6-a
x go/pkg/obj/go-build/b4/
x go/pkg/obj/go-build/b4/b418591af0dc57349f775c22fa445f8897d6f42154c9c63b512f81d3a9c377c4-a
x go/pkg/obj/go-build/b4/b41906da919cf515d0f400569b5db83a7aba0c86d750b8d43943522f24c85dbc-a
x go/pkg/obj/go-build/b4/b41a19bdbc4291a49125807138697b277b63ede61aa9cc6c156f96f9c2490fc6-a
x go/pkg/obj/go-build/b4/b41b018e6fd90eb7d3708baa5177826b167157b9a944c3148b4e4314d506483b-a
x go/pkg/obj/go-build/b4/b42536b0e5e9218f3d364058bcd6e78d074a921c9f8668fd0b222924aba02d3b-d
x go/pkg/obj/go-build/b4/b42b5ba9d75e302009e94ba0fdda3a708ac36b2a09b874d306f8a883d17852e6-a
x go/pkg/obj/go-build/b4/b448601c06abef7014d7f55c9d62f453fff18af805867e5a7234db4c09b078a6-a
x go/pkg/obj/go-build/b4/b44a2827d07c0b8e2d85de3659e94e30ab8d6fd36638ad3345eb56d3a57d0f22-d
x go/pkg/obj/go-build/b4/b44e858bb7721b8cbae96439d91d9fa6b4f6108d2bf6b97c231e1823074ea7dd-a
x go/pkg/obj/go-build/b4/b4508593d52300d264b6babeda0b100292b9ef2e61c963c79b70eca8a2a5e2ab-a
x go/pkg/obj/go-build/b4/b452dccf905cb38f86daabf8c62bb14de17d0ec914757219aa0c57d53fc064b3-a
x go/pkg/obj/go-build/b4/b45ab42f27a6f26fae5fe4c87985d34e5c6bd2c80280460940f705d243a10db5-d
x go/pkg/obj/go-build/b4/b464a874b3c237eb6c3dcd3e3246283ccba2f320b3a632902958265ada857f9d-d
x go/pkg/obj/go-build/b4/b46e7c408d91df61b161b56223d367493b3ce60d9d5e306a4392ff163bae6b5e-a
x go/pkg/obj/go-build/b4/b4707c82f70ce923ccd5f6411bfdb6fbf27688047692cccbe022420ed4dceed4-a
x go/pkg/obj/go-build/b4/b4795058f5517f4dd16110e204ed4d8f73e6876c1add6f0c284a2533484e60ed-d
x go/pkg/obj/go-build/b4/b489c0041d189b2d7d2e33740a505498f1689472f849729fe182d14c85b5ecab-a
x go/pkg/obj/go-build/b4/b48a5b08d9cf7f728a635ecb196233268f63928bd960073981d66c02d80c0ef7-d
x go/pkg/obj/go-build/b4/b496da3191a9e52387c5cc321c44dd1abcf1767fe8b008317e716f63c7bc88c6-d
x go/pkg/obj/go-build/b4/b49c9d284a076123bb616143ee3d9d6bbb4cf5edebd0faa64f8009b9dc43360e-d
x go/pkg/obj/go-build/b4/b49cc5d7bdd1f58353817504e487f875c1f0decfe52f9fcc2ad80f84f29d0684-a
x go/pkg/obj/go-build/b4/b49e6e8326fe82f60d2518e69359e6835304f8a03ea6995636e2d491e4d5b3ee-a
...

size comparison

jaten@Jasons-MacBook-Pro /usr/local $ mv go go1.10beta1
jaten@Jasons-MacBook-Pro /usr/local $ cd go1.10beta1/
jaten@Jasons-MacBook-Pro /usr/local/go1.10beta1 $ du -sh .
666M    .
jaten@Jasons-MacBook-Pro /usr/local/go1.10beta1 $ cd ../go1.9.1/
jaten@Jasons-MacBook-Pro /usr/local/go1.9.1 $ du -sh .
309M    .
jaten@Jasons-MacBook-Pro /usr/local/go1.9.1 $ cd ..
jaten@Jasons-MacBook-Pro /usr/local $ cd go1.10beta1/pkg/obj/go-build/
jaten@Jasons-MacBook-Pro /usr/local/go1.10beta1/pkg/obj/go-build $ du -sh .
324M    .
jaten@Jasons-MacBook-Pro /usr/local/go1.10beta1/pkg/obj/go-build $

inspect one of these

jaten@Jasons-MacBook-Pro /usr/local/go1.10beta1/pkg/obj/go-build/ea $ file eaf09095ca74c5e3fa5a01786523c92c47b10d1237df5d850a8489470142c56e-a
eaf09095ca74c5e3fa5a01786523c92c47b10d1237df5d850a8489470142c56e-a: ASCII text
jaten@Jasons-MacBook-Pro /usr/local/go1.10beta1/pkg/obj/go-build/ea $ cat eaf09095ca74c5e3fa5a01786523c92c47b10d1237df5d850a8489470142c56e-a
v1 eaf09095ca74c5e3fa5a01786523c92c47b10d1237df5d850a8489470142c56e f36c2b70fab16bcf82b22601aa2806cb07dfbdce93a31c8cb9cd27b435aab0a9                   23  1512671685299751000
jaten@Jasons-MacBook-Pro /usr/local/go1.10beta1/pkg/obj/go-build/ea $

observe that following the directions in the README does nothing to shrink the consumed space

jaten@Jasons-MacBook-Pro /usr/local/go/pkg/obj/go-build $ cat README
This directory holds cached build artifacts from the Go build system.
Run "go clean -cache" if the directory is getting too large.
See golang.org to learn more about Go.
jaten@Jasons-MacBook-Pro /usr/local/go/pkg/obj/go-build $ du -sh .
324M    .
jaten@Jasons-MacBook-Pro /usr/local/go/pkg/obj/go-build $ go clean -cache
jaten@Jasons-MacBook-Pro /usr/local/go/pkg/obj/go-build $ du -sh .
324M    .
jaten@Jasons-MacBook-Pro /usr/local/go/pkg/obj/go-build $ go version
go version go1.10beta1 darwin/amd64
jaten@Jasons-MacBook-Pro /usr/local/go/pkg/obj/go-build $
@glycerine
Copy link
Author

glycerine commented Jan 2, 2018

Perhaps these are artifacts of rsc's build caching effort described here... https://groups.google.com/forum/#!topic/golang-dev/qfa3mHN4ZPA and in the https://beta.golang.org/doc/go1.10#build section of the release notes?

For those of us users who typically use a readonly GOROOT, there will never be any GOROOT sub directdory build cache checks necessary--its all static.

@glycerine
Copy link
Author

glycerine commented Jan 2, 2018

Hmm, perhaps not. I checked the GOCACHE setting, and its not set to $GOROOT/pkg/obj/go-build...

jaten@Jasons-MacBook-Pro /usr/local/go $ go env GOCACHE
/Users/jaten/Library/Caches/go-build
jaten@Jasons-MacBook-Pro /usr/local/go $

@ianlancetaylor ianlancetaylor changed the title go1.10beta1 ships as: 2x the size of 1.9.1 due to pkg/obj/go-build files. go clean -cache does not shrink release: go1.10beta1 ships as: 2x the size of 1.9.1 due to pkg/obj/go-build files. go clean -cache does not shrink Jan 2, 2018
@ianlancetaylor ianlancetaylor added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Jan 2, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Jan 2, 2018
@ianlancetaylor
Copy link
Contributor

CC @andybons

@andybons andybons self-assigned this Jan 2, 2018
@rsc
Copy link
Contributor

rsc commented Jan 4, 2018

Should be fixed by https://go-review.googlesource.com/82095

@rsc rsc closed this as completed Jan 4, 2018
@golang golang locked and limited conversation to collaborators Jan 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

5 participants