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

Execution log + remote cache = very long build time #23319

Closed
OparinE opened this issue Aug 16, 2024 · 7 comments
Closed

Execution log + remote cache = very long build time #23319

OparinE opened this issue Aug 16, 2024 · 7 comments
Labels
awaiting-user-response Awaiting a response from the author team-Performance Issues for Performance teams type: bug untriaged

Comments

@OparinE
Copy link

OparinE commented Aug 16, 2024

Description of the bug:

Official way of cache hit debugging is based on execution logs gathering cache-remote.
However if we build with execution_logs ON and remote_cache ON build time increases dramatically (x2-x5).

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

I have a target of 30 build actions (cpp code + packaging).
Build time average (sec):
no options:___________________________________28
disk cache in ON:_____________________________13
execution json log is ON:_____________________28
execuion json log is ON, disk cache is ON:___59

Disk cache is ON build shows repos fetching time. If bare in mind this,
(execuion json log is ON + disk cache is ON) / execution json log is ON = 46 / 15 = 3 times

Which operating system are you running Bazel on?

Windows

What is the output of bazel info release?

7.0.2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@satyanandak satyanandak added team-Rules-CPP Issues for C++ rules team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website labels Aug 16, 2024
@tjgq
Copy link
Contributor

tjgq commented Aug 16, 2024

Consider using --experimental_execution_log_compact_file instead (see #18643 (comment)). The --execution_log_json_file and --execution_log_binary_file formats are fundamentally inefficient; it's unlikely that they can be improved.

@OparinE
Copy link
Author

OparinE commented Aug 16, 2024

@tjgq , I tries --experimental_execution_log_compact_file on bazel 7.2.0. General behavior is the same.
+
in my opinion, --execution_log_json_file works faster than --experimental_execution_log_compact_file, because there is no zipping operation.

@tjgq
Copy link
Contributor

tjgq commented Aug 16, 2024 via email

@OparinE
Copy link
Author

OparinE commented Aug 19, 2024

@meteorcloudy meteorcloudy added team-Remote-Exec Issues and PRs for the Execution (Remote) team and removed team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website labels Aug 20, 2024
@tjgq
Copy link
Contributor

tjgq commented Aug 21, 2024

It looks like these are for the json format. Can you also capture a profile for the compact format under the same conditions?

in my opinion, --execution_log_json_file works faster than --experimental_execution_log_compact_file, because there is no zipping operation.

This shouldn't be the case for a typical build. The zstd compression is not the only difference between the two formats; the compact format avoids redundant work in other ways. (It's possible that your build is atypical, which is why I'd like to see both profiles).

@tjgq tjgq added awaiting-user-response Awaiting a response from the author team-Performance Issues for Performance teams and removed team-Rules-CPP Issues for C++ rules team-Remote-Exec Issues and PRs for the Execution (Remote) team labels Aug 21, 2024
@OparinE
Copy link
Author

OparinE commented Aug 23, 2024

@tjgq , performance with --experimental_execution_log_compact_file= looks much better.
There is no build time big difference between (exe_logs is ON + cache is ON) and (exe_logs is ON) as it was with json execution logs.
Seems like support of json and pure binary logs from bazel perspective are not critical tasks, am I right?
If so, please close the issue. I'll to switch to next bazel version.

@tjgq
Copy link
Contributor

tjgq commented Aug 23, 2024

Thanks for checking that the compact format works for you!

I will close this issue, as I don't think it's possible to improve performance for the json/binary formats. The way forward is to point people to the compact format and deprecate them.

@tjgq tjgq closed this as completed Aug 23, 2024
@tjgq tjgq closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-user-response Awaiting a response from the author team-Performance Issues for Performance teams type: bug untriaged
Projects
None yet
Development

No branches or pull requests

6 participants