Skip to content
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

Cache uploads shouldn't block dependent local actions #13632

Closed
brentleyjones opened this issue Jul 1, 2021 · 2 comments
Closed

Cache uploads shouldn't block dependent local actions #13632

brentleyjones opened this issue Jul 1, 2021 · 2 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: feature request

Comments

@brentleyjones
Copy link
Contributor

Description of the problem / feature request:

Currently cache uploads take place as the last part of a local action spawn. This ties up the local_cpu_resources, and also prevents dependent local action spawns from starting (even though they have the inputs they need now).

Instead, the upload of local actions outputs to the cache should be independent spawns, that don't count towards local_cpu_resources, and don't block dependent local actions. Remote actions that need the output as input (found via FindMissingBlobs) should still wait for the upload to finish, including the already started upload with the other inputs in RemoteExecutionCache.ensureInputsPresent().

Feature requests: what underlying problem are you trying to solve with this feature?

By doing this, a non-remote build can complete a lot faster, as it no longer has to wait for uploads to finish to move onto the next action. These uploads will no longer take up local_cpu_resources, allowing for more parallel local actions (as long as --jobs is set higher than --local_cpu_resources). The end of the build can report that it's waiting for uploads to finish, similar to what it does today for BES and Profile uploading.

What operating system are you running Bazel on?

macOS 11.4

What's the output of bazel info release?

4.1.0 and HEAD

Have you found anything relevant by searching the web?

@coeuvre
Copy link
Member

coeuvre commented Jul 2, 2021

Thanks for bringing this up! I will look into it!

BTW, I had similar idea recently but for downloads i.e. downloading the outputs of a remote action shouldn't block dependent remote actions. #13630 is working towards this feature.

@coeuvre coeuvre self-assigned this Jul 2, 2021
@coeuvre coeuvre added P1 I'll work on this now. (Assignee required) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: feature request labels Jul 2, 2021
@coeuvre
Copy link
Member

coeuvre commented Sep 13, 2021

Fixed by #13655.

@coeuvre coeuvre closed this as completed Sep 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) team-Remote-Exec Issues and PRs for the Execution (Remote) team type: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants