feat: make job subprocess oom_score_adj configurable (#10443)

* feat: make job subprocess oom_score_adj configurable via JOB_OOM_SCORE_ADJ

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix: warn when JOB_OOM_SCORE_ADJ leaves no gap over the worker's own score

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* style: drop em dash from JOB_OOM_SCORE_ADJ doc comment

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix: warn on any oom_score_adj gap too small to steer the OOM killer

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-08-01 11:50:47 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent 7a70d6aa3b
commit 25084170d7
5 changed files with 114 additions and 33 deletions
@@ -3026,7 +3026,11 @@ pub async fn handle_python_reqs(
"failed to get PID for python installation process: {}",
&req
)))
.and_then(|pid| write_file(&format!("/proc/{pid}"), "oom_score_adj", "1000"))
.and_then(|pid| write_file(
&format!("/proc/{pid}"),
"oom_score_adj",
&windmill_common::worker::JOB_OOM_SCORE_ADJ.to_string(),
))
{
tracing::error!(
req = %req,