mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-17 06:06:29 +00:00
Improve system behavior on low memory situation (#3781)
* Improve system behavior on low memory situation Adjust OOM killer score to prevent crucial services from getting selected. * Adjust OOM score of DNS plug-in as well
This commit is contained in:
parent
b4e1e3e853
commit
9c7de4a6c3
@ -489,6 +489,7 @@ class DockerAddon(DockerInterface):
|
|||||||
environment=self.environment,
|
environment=self.environment,
|
||||||
volumes=self.volumes,
|
volumes=self.volumes,
|
||||||
tmpfs=self.tmpfs,
|
tmpfs=self.tmpfs,
|
||||||
|
oom_score_adj=200,
|
||||||
)
|
)
|
||||||
except DockerNotFound:
|
except DockerNotFound:
|
||||||
self.sys_resolution.create_issue(
|
self.sys_resolution.create_issue(
|
||||||
|
@ -50,6 +50,7 @@ class DockerDNS(DockerInterface, CoreSysAttributes):
|
|||||||
str(self.sys_config.path_extern_dns): {"bind": "/config", "mode": "rw"},
|
str(self.sys_config.path_extern_dns): {"bind": "/config", "mode": "rw"},
|
||||||
DBUS_PATH: DBUS_VOLUME,
|
DBUS_PATH: DBUS_VOLUME,
|
||||||
},
|
},
|
||||||
|
oom_score_adj=-300,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._meta = docker_container.attrs
|
self._meta = docker_container.attrs
|
||||||
|
@ -149,6 +149,7 @@ class DockerHomeAssistant(DockerInterface):
|
|||||||
ENV_TOKEN_OLD: self.sys_homeassistant.supervisor_token,
|
ENV_TOKEN_OLD: self.sys_homeassistant.supervisor_token,
|
||||||
},
|
},
|
||||||
tmpfs={"/tmp": ""},
|
tmpfs={"/tmp": ""},
|
||||||
|
oom_score_adj=-300,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._meta = docker_container.attrs
|
self._meta = docker_container.attrs
|
||||||
|
@ -55,6 +55,7 @@ class DockerObserver(DockerInterface, CoreSysAttributes):
|
|||||||
},
|
},
|
||||||
volumes={"/run/docker.sock": {"bind": "/run/docker.sock", "mode": "ro"}},
|
volumes={"/run/docker.sock": {"bind": "/run/docker.sock", "mode": "ro"}},
|
||||||
ports={"80/tcp": 4357},
|
ports={"80/tcp": 4357},
|
||||||
|
oom_score_adj=-300,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._meta = docker_container.attrs
|
self._meta = docker_container.attrs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user