Skip to content

Commit

Permalink
OOM_FRAME_OVERBOARD_ALLOWED_THRESHOLD can be deactivated with -1
Browse files Browse the repository at this point in the history
(cherry picked from commit 647e75e2254c7a7ff68c544e438080f412bf04c1)
  • Loading branch information
DiegoTavares committed Oct 4, 2023
1 parent a4c832d commit ee9748c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Copyright Contributors to the OpenCue Project
*
Expand Down Expand Up @@ -111,8 +110,10 @@ public interface Dispatcher {
// Percentage of used memory to consider a risk for triggering oom-killer
public static final double OOM_MAX_SAFE_USED_MEMORY_THRESHOLD = 0.95;

// How much can a frame exceed its reserved memory
public static final double OOM_FRAME_OVERBOARD_ALLOWED_THRESHOLD = 0.25;
// How much can a frame exceed its reserved memory.
// - 0.5 means 50% above reserve
// - -1.0 makes the feature inactive
public static final double OOM_FRAME_OVERBOARD_ALLOWED_THRESHOLD = 0.6;

// A higher number gets more deep booking but less spread on the cue.
public static final int DEFAULT_MAX_FRAMES_PER_PASS = 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ private void handleMemoryUsage(final DispatchHost host, final HostReport report)
// When no mass cleaning was required, check for frames going overboard
// if frames didn't go overboard, manage its reservations trying to increase
// them accordingly
for (final RunningFrameInfo frame: runningFrames) {
if (isFrameOverboard(frame)) {
for (final RunningFrameInfo frame : runningFrames) {
if (OOM_FRAME_OVERBOARD_ALLOWED_THRESHOLD > 0 && isFrameOverboard(frame)) {
if (!killFrameOverusingMemory(frame, host.getName())) {
logger.warn("Frame " + frame.getJobName() + "." + frame.getFrameName() +
" is overboard but could not be killed");
Expand Down

0 comments on commit ee9748c

Please sign in to comment.