Skip to content

slots: size each Bazel server's heap from the measured peak - #15317

Open
TrapsterDK wants to merge 1 commit into
mainfrom
speed-heap-aware-slots
Open

TrapsterDK wants to merge 1 commit into
mainfrom
speed-heap-aware-slots

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Part of #15298.

  • Measured one slot server during tools/dx check //...: post-full-GC live heap plateaued at about 13.8 GiB (an 8 GiB cap ran 250 full GCs and stayed pinned at the cap). Heap = 13.8 * 1.25, rounded up = 18 GiB, passed as one stable --host_jvm_args=-Xmx18g per slot (cli/process/src/slot_pool.rs, cli/process/src/lib.rs).
  • BYTES_PER_SLOT = heap + 3 GiB action memory; local_share subtracts the heap from each slot's action share.
  • SLOT_MAX_IDLE_SECS 300 -> 3600; REAP_MIN_IDLE and memory pressure remain the early stops.
  • OOM hint names the 18 GiB heap and what to do.
  • Tests: sizing math, idle constant, hint text; existing slot-count tests updated for the 21 GiB slot.

Tests: tools/dx test //cli/process:dx_process_test //cli/plan:dx_plan_test //cli/exec_core:dx_exec_core_test -- --jobs=4 passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hxb7tMzRqzVaKmAvVT

A //... check holds about 13.8 GiB live after a full GC, so a fixed 4 GiB
(and even 8 GiB) heap thrashed in full GCs. Each slot server now gets one
stable --host_jvm_args=-Xmx18g, a slot is planned as heap plus action memory,
local_share subtracts the heap, and idle servers live for an hour.

Part of #15298.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant