Skip to content

Commit 13a6f58

Browse files
committed
Change container workload's default OOM Score
This makes the container workload a very likely candidate for the OOMKiller when the CS VM is experiencing out of memory issues.
1 parent 545a4bc commit 13a6f58

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

launcher/container_runner.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ func NewRunner(ctx context.Context, cdClient *containerd.Client, token oauth2.To
186186
if err != nil {
187187
return nil, &RetryableError{err}
188188
}
189+
190+
// Set the container process's OOM score to 1000.
191+
containerSpec.Process.OOMScoreAdj = 1000
192+
189193
// Container process Args length should be strictly longer than the Cmd
190194
// override length set by the operator, as we want the Entrypoint filed
191195
// to be mandatory for the image.

0 commit comments

Comments
 (0)