Skip to content

feat: add oom_score_adj to all AIO containers#8083

Open
Copilot wants to merge 6 commits into
mainfrom
copilot/add-oom-score-adj-setting-again
Open

feat: add oom_score_adj to all AIO containers#8083
Copilot wants to merge 6 commits into
mainfrom
copilot/add-oom-score-adj-setting-again

Conversation

Copilot AI commented May 12, 2026

Copy link
Copy Markdown
Contributor

Sets oom_score_adj on all AIO containers so the Linux OOM killer targets less critical containers first under memory pressure. The default for containers without an explicit value is 500, placing them slightly above typical host processes. Values are assigned by priority tier:

  • -300: database, redis, borgbackup, watchtower (most protected)
  • -100: apache, nextcloud
  • +100: notify-push, harp, docker-socket-proxy
  • +300: all remaining containers (collabora, talk, talk-recording, clamav, onlyoffice, imaginary, fulltextsearch, whiteboard, domaincheck)
  • +500: default for any container without an explicit value

Changes Made

  • containers.json: oom_score_adj values set on all 18 containers according to the tiers above.
  • containers-schema.json: Added oom_score_adj as an integer property with minimum: -1000 and maximum: 1000.
  • Container.php: New public int $oomScoreAdj property.
  • ContainerDefinitionFetcher.php: Parses oom_score_adj from JSON and assigns it directly; default is 500 when not specified.
  • DockerActionManager.php: Sets HostConfig.OomScoreAdj during CreateContainer(); skipped when value is 0.

@szaimen szaimen added 2. developing Work in progress enhancement New feature or request labels May 12, 2026
@szaimen szaimen added this to the next milestone May 12, 2026
@szaimen

This comment was marked as resolved.

Copilot AI and others added 2 commits May 12, 2026 11:33
Copilot AI requested a review from szaimen May 12, 2026 11:34
@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 12, 2026
@szaimen szaimen marked this pull request as ready for review May 12, 2026 11:39
Comment thread php/src/ContainerDefinitionFetcher.php Outdated
Comment thread php/containers-schema.json Outdated
Copilot AI requested a review from szaimen May 12, 2026 11:56

@Zoey2936 Zoey2936 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, I don't see any reasons why the nextcloud AIO containers should be more important then my other containers on my host. Maybe give important containers a small boost and don't change the default of the other containers, but these values are far from is acceptable. To work against this I would need to change the values for all my important running processes like my mail server. Otherwise my postfix or the reverse proxy could be killed to safe collabora or elasticsearch

@szaimen

szaimen commented May 12, 2026

Copy link
Copy Markdown
Collaborator

@copilot please change default in ContainersDefinitionFetcher to 500 instead of 0 and adjust the all added values by +500

Copilot AI commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please change default in ContainersDefinitionFetcher to 500 instead of 0 and adjust the all added values by +500

Done in 46949e8. Default is now 500, and all container values are shifted by +500 (e.g. database/redis/borgbackup/watchtower: -300, apache/nextcloud: -100, notify-push/harp/docker-socket-proxy: +100, remaining: +300).

@szaimen szaimen requested a review from Zoey2936 May 12, 2026 13:06
@szaimen

szaimen commented May 12, 2026

Copy link
Copy Markdown
Collaborator

@Zoey2936 what do you think about this solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants