feat: add oom_score_adj to all AIO containers#8083
Conversation
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/7d889ade-ce37-4753-9711-16169f4d7252 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/7d889ade-ce37-4753-9711-16169f4d7252 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This comment was marked as resolved.
This comment was marked as resolved.
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/cc42faee-be3d-4646-9232-f87b001bc065 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/cc42faee-be3d-4646-9232-f87b001bc065 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/87c4cd21-c405-46fd-b522-b6658f2f3b93 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
There was a problem hiding this comment.
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
|
@copilot please change default in ContainersDefinitionFetcher to 500 instead of 0 and adjust the all added values by +500 |
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/ee392f46-0932-4e7d-9158-3d46eb27beef Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Done in 46949e8. Default is now |
|
@Zoey2936 what do you think about this solution? |
Sets
oom_score_adjon all AIO containers so the Linux OOM killer targets less critical containers first under memory pressure. The default for containers without an explicit value is500, placing them slightly above typical host processes. Values are assigned by priority tier:Changes Made
containers.json:oom_score_adjvalues set on all 18 containers according to the tiers above.containers-schema.json: Addedoom_score_adjas anintegerproperty withminimum: -1000andmaximum: 1000.Container.php: Newpublic int $oomScoreAdjproperty.ContainerDefinitionFetcher.php: Parsesoom_score_adjfrom JSON and assigns it directly; default is500when not specified.DockerActionManager.php: SetsHostConfig.OomScoreAdjduringCreateContainer(); skipped when value is0.