I
Immich3y ago
Alex_

Extreme slowdown on Raspberry pi

Discussed this a bit in #immich already, but after further tweaking i'm starting to suspect there may be something actually wrong with my implementation on Rpi 4 64bit (4gb ram).
I wiped everything and started from scratch. My upload_location is an FSTAB-mounted NFS drive (unencrypted this time, so that shouldnt slow anything down). Server runs great on initial launch, user is created, i connect via mobile app and I selected an album of 20 small photos to upload. They upload fast and are quickly visible in the web interface. Shortly afterward, the RPI becomes incredibly slow and almost completely unresponsive. Monitoring CPU usage through htop showed RAM and CPU mostly maxed out (until htop simply stopped responding) and now the entire system is completely unresponsive for over half an hour, despite only uploading 20 images. I understand the RPI is slower than most x86 but, should this be expected? anything you can suggest to help me troubleshoot what might be happening here? not sure what to try next... thanks for all your hard work and responses (devs and anyone else who might be willing to assist)!
17 Replies
zody
zody3y ago
I assume you're running the machine learning container? If so, you probably need to disable it because the pi is not powerful enough do the machine learning computations in a decent time. docker compose down, comment out the ML container in docker-compose.yml. Set IMMICH_MACHINE_LEARNING_URL=false in .env Then, docker compose up
Alex_
Alex_OP3y ago
thank you, i asked this specifically earlier if maybe that should be disabled but Alex didn't seem to see that as a cause for concern at the time. I'll give this a shot and see what happens what functionality might be lost by disabling that?
zody
zody3y ago
Object detection, and the super cool new search added in the latest release
Alex_
Alex_OP3y ago
is that typesense? should i disable typesense also if ML is disabled?
zody
zody3y ago
You can also disable typesense. You will lose any search function, though.
Alex_
Alex_OP3y ago
so typesense will still work (to a lesser degree) without ML?
zody
zody3y ago
I guess, but I haven't tried that combination myself. I'd leave typesense enabled as it shouldn't use lots of compute without ML
Alex_
Alex_OP3y ago
ok ty, i will give it a shot now. hopefully this helps so far it appears as though disabling machine learning has done the trick and the RPI has resumed being usable again. thank you!
zody
zody3y ago
You're welcome!
etnoy
etnoy3y ago
Would you be willing to open an GitHub issue for adding this to the FAQ?
Alex_
Alex_OP3y ago
sure
Alex_
Alex_OP3y ago
@etnoy https://github.com/immich-app/immich/issues/2064 hope the format here is ok, not really experienced with submitting bugs/issues
GitHub
[FAQ Update] Machine Learning Raspberry Pi performance issues · Iss...
The bug As requested in Discord, Im submitting this issue here in order to request to have warnings added to the FAQ for users who are installing Immich on Raspberry Pi systems. Default immich depl...
etnoy
etnoy3y ago
Thanks!
etnoy
etnoy3y ago
FAQ | Immich
What is the difference between the cloud icon on the mobile app?
Knight
Knight3y ago
Hey @Alex_, What was the Ram usage like when running Raspberry Pi? Did you increase the Swap space and check if low ram was causing the issue? That was the main cause on my Rpi 3b.
Alex_
Alex_OP3y ago
@Knight I believe ram was basically maxed at around 4gb, but i did not play with swap size at all. swap was maxed at its default 100mb on my raspbian setup.
tamasnemeti
tamasnemeti3y ago
Apologies for barging in, but how much swap did you allocate on your 3b? I'm trying to spin Immich up, but starting the containers pretty much kills my Pi. I can ping it, but nothing else. I guess its swamped as hell due to not having enough RAM and/or swap probably? Nevermind - I've just set up a GB of swap to be on the safe side, and it started up fine. My swap usage is about 0.5GBs right now and I'm running a few other services as well. Might be worthwhile to add this to the FAQ as well.

Did you find this page helpful?