Add --cpu-rt-runtime to allow Docker allocate real-time CPU time (#1235) (#1236)

* Add --cpu-rt-runtime to allow Docker allocate real-time CPU time (#1235)

* Enable Supervisor's CPU bandwith allocation feature (#1235)

Since we have CONFIG_RT_GROUP_SCHED enabled in the Home Assistant OS
kernel the Supervisor needs to enable CPU bandwith allocation for
Add-Ons which need real-time scheduling. Set the appropriate environment
variable.
This commit is contained in:
Stefan Agner 2021-02-25 18:40:24 +01:00 committed by GitHub
parent 5c17e0974b
commit 82a40de894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -3,4 +3,4 @@ RequiresMountsFor=/etc/docker /mnt/data /var/lib/docker
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// --storage-driver=overlay2 --log-driver=journald --data-root /mnt/data/docker
ExecStart=/usr/bin/dockerd -H fd:// --cpu-rt-runtime=950000 --storage-driver=overlay2 --log-driver=journald --data-root /mnt/data/docker

View File

@ -79,6 +79,7 @@ if [ -z "${SUPERVISOR_CONTAINER_ID}" ]; then
-v /mnt/boot:/os/boot:rw \
-e SUPERVISOR_SHARE=${SUPERVISOR_DATA} \
-e SUPERVISOR_NAME=hassio_supervisor \
-e SUPERVISOR_CPU_RT=1 \
-e SUPERVISOR_MACHINE=${SUPERVISOR_MACHINE} \
"${SUPERVISOR_IMAGE}:latest"
fi