Skip to content

Commit 3e8f9a1

Browse files
committed
deprecated
1 parent 1b932c4 commit 3e8f9a1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

inspector/inspector.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,9 +624,13 @@ def parse(ctx):
624624
def inspect(ctx, vendor, instance, gpu_count, threads):
625625
"""Run inspection on this machine."""
626626
# Disable OOM killer for this task as Linux tends to kill this instead of benchmarks, like bw_mem
627-
pid=os.getpid()
628-
with open(f"/proc/{pid}/oom_adj", mode="w+") as f:
629-
f.write("-17")
627+
pid = os.getpid()
628+
try:
629+
with open(f"/proc/{pid}/oom_score_adj", mode="w") as f:
630+
f.write("-1000")
631+
except Exception:
632+
# If it fails, log but continue (not critical)
633+
logging.warning("Could not disable OOM killer for inspector process")
630634

631635
logging.info("Updating the git repo")
632636
# we must clone the repo before writing anything to it

0 commit comments

Comments
 (0)