Execution Log Sorting Causes Huge Memory Consumption when --execution_log_binary_file
and --execution_log_json_file
are enabled
#17111
Labels
good first issue
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Performance
Issues for Performance teams
type: bug
Description of the bug:
Both
--execution_log_binary_file
and--execution_log_json_file
do execution log sorting. This requires Bazel to load the entire log into memory and if execution is big enough then it causes out of memory issues.On real-life scenarios it's required to give up to
--host_jvm_args=-Xmx64g
just to let it sort a log.While sorting may be useful for some scenarios, this is far from being necessary everywhere. For example, in our scenario execution log is needed only to understand how many non-cached actions were there and what are they. It's absolutely meaningless to spend all that memory to sort it.
I believe that sorting should be part of execution log comparison tools, not Bazel itself. Or at least Bazel should provide a way to opt-out from sorting for those for whom that is not needed.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
bazel build --execution_log_binary_file=log.bin //some/big/target
Which operating system are you running Bazel on?
linux
What is the output of
bazel info release
?release 6.0.0
If
bazel info release
returnsdevelopment 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 master; git rev-parse HEAD
?Have you found anything relevant by searching the web?
https://bazelbuild.slack.com/archives/CA31HN1T3/p1672037815196099
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: