Default bazel_jvm_heap_ram_ratio to 0.5 for all Evergreen jobs

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: Bazel
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Generalizes the Bazel-server JVM heap sizing introduced in #58821 (SERVER-131207) so it applies to *all* Evergreen Bazel jobs by default, rather than only the large resmoke test task group.

          1. What changed
      • *`evergreen/generate_evergreen_bazelrc.sh`*: `bazel_jvm_heap_ram_ratio` now defaults to `0.5` (`${bazel_jvm_heap_ram_ratio:-0.5}`) instead of being a no-op when unset. Since this script runs as part of the shared `setup bazel (credentials, bazelrc)` func, the `startup --host_jvm_args=-Xmx<ratio*RAM>m` line is now emitted for every Evergreen Bazel job.
      • *`etc/evergreen_yml_components/tasks/resmoke/non_server_teams/tasks.yml`*: removed the now-redundant per-task `bazel_jvm_heap_ram_ratio: "0.5"` override, since the default covers it.
          1. Why
            The Bazel server JVM otherwise defaults to ~25% of host RAM. On jobs that hold many concurrent remotely-executed actions in memory that heap gets exhausted, sending the server into a GC death-spiral (heap pinned ~99% full, all worker threads parked, build stalls) — which is what a `run_bazel_compiledb` JVM thread dump showed. Bumping the ceiling to 50% of host RAM gives the server headroom across the board.
          1. Safety
      • *Linux-only*: guarded by `[[ -r /proc/meminfo ]]`, so Windows/macOS jobs are unaffected.
      • *Ceiling, not reservation*: `-Xmx` is a max; G1 only grows to it under real pressure.
      • *Overridable*: tasks needing a different ratio can still set the `bazel_jvm_heap_ram_ratio` expansion.

            Assignee:
            Zack Winter
            Reporter:
            Zack Winter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: