homebridge / docker-homebridge

Homebridge Docker. HomeKit support for the impatient using Docker on x86_64, Raspberry Pi (armhf) and ARM64. Includes ffmpeg + libfdk-aac.
https://hub.docker.com/r/homebridge/homebridge/
GNU General Public License v3.0
2.57k stars 241 forks source link

hb-service doubles memory usage #453

Closed benzman81 closed 2 years ago

benzman81 commented 2 years ago

Describe The Bug

Switched from https://github.com/marcoraddatz/homebridge-docker to your image as it is no longer supported. One bad thing I noted is, that it uses twice as much memory as marcoraddatz/homebridge. Looking at the processes I can see, that hb-service is the one process that uses more memory than homebridge and so more than doubles the memory usage.

I start the image like this: docker run --name=homebridge-foo -d --restart=on-failure:10 --net=host -e HOMEBRIDGE_CONFIG_UI=0 -e HOMEBRIDGE_CONFIG_UI_PORT=51837 -v /volume1/docker/homebridge-foo:/homebridge oznu/homebridge:latest

Since I start multiple homebridges on my Diskstation to keep things seperated, this is huge issue as my currently four instances eat up a bit more than half of the disk stations memory.

Is this a bug or is there some setting or so that I can change this behavior or is this "works as designed" as I have to deal with it?

Docker Config

docker run --name=homebridge-foo -d --restart=on-failure:10 --net=host -e HOMEBRIDGE_CONFIG_UI=0 -e HOMEBRIDGE_CONFIG_UI_PORT=51837  -v /volume1/docker/homebridge-foo:/homebridge oznu/homebridge:latest

Logs

No log needed

Host Operating System

Synology DSM

Host Architecture

x86_64 / amd64

oznu commented 2 years ago

Use Child Bridges and keep everything in the same container: https://github.com/homebridge/homebridge/wiki/Child-Bridges

This image includes the Homebridge UI, hence the extra memory consumption.

benzman81 commented 2 years ago

Ok, i give that a try. Didn't know that exists.