-
Notifications
You must be signed in to change notification settings - Fork 691
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
container rules put high load on remote cache #1855
Comments
Here's a slightly reduced execution log showing the three spawns that resulted in the remote-cachable outputs above
|
alexeagle
added a commit
to alexeagle/rules_docker
that referenced
this issue
May 20, 2021
alexeagle
added a commit
to alexeagle/rules_docker
that referenced
this issue
May 20, 2021
alexeagle
added a commit
that referenced
this issue
May 21, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm following up from a severe outage caused by a remote cache overload.
rules_docker tries to be careful to use layer tars as the primary outputs of rules, which is great. However there are lots of cases where an entire OCI image is the output of a rule, and this causes a ton of load on remote cache. In particular, we have some actions that run something fast (like
gzip
) to transform some large files into some other large files. These action results are not appropriate to send to the remote cache because under most conditions it's faster to perform the action again locally than to fetch from the remote cache.As an illustration, take the example from the top of rules_docker README
WORKSPACE
Then I just build that image (no BUILD files required for this repro!)
By instrumenting the remote cache to reject uploads over 10MB (see buchgr/bazel-remote#440) I can see that we attempt to upload three such blobs:
That's a 17MB object, a 162MB object, and a 192MB object being stored in the cache for a build that depends on the java_base image.
I think perhaps we should audit some of the actions that are expected to produce whole-image outputs, and mark these with
tags=['no-remote-cache']
The text was updated successfully, but these errors were encountered: