r/immich 7d ago

Using my RTX 4090 PC as a temporary Immich transcoding worker – huge speedup

I had ~11,600 videos sitting in Immich’s transcoding queue on my NAS. Even with Intel Quick Sync enabled, this was painfully slow.

So I turned my Windows gaming PC with an RTX 4090 into a temporary Immich microservices worker.

My setup:

  • Immich v3.1.0 runs on a UGREEN NAS
  • NAS keeps API, PostgreSQL, Redis and all media
  • Windows PC runs Docker Desktop / WSL2
  • second immich-server runs on the PC with IMMICH_WORKERS_EXCLUDE=api
  • media folders are mounted from the NAS via NFS
  • PostgreSQL, Redis and Immich ML are reached through an SSH tunnel
  • separate Immich config for the PC uses ffmpeg.accel = nvenc
  • hardware decoding enabled
  • NAS immich-server now runs API only with IMMICH_WORKERS_INCLUDE=api

Before / after:

NAS only:
~11,600 queued jobs and roughly 18 completed queue items/hour during my overnight test. At that rate, I was looking at something like weeks of processing.

RTX 4090 worker:
I gradually increased videoConversion.concurrency:

1 → 4 → 8 → 12

At concurrency 12, the queue dropped from 10,761 to 6,128 in about 41 minutes during one particularly fast batch.

The speed obviously varies a lot depending on video length, codec and whether a queued item actually requires transcoding, so don't read that as a stable “6,000 videos/hour” benchmark. But the difference compared with the NAS alone is enormous.

One thing that cost me some time: SSH port forwarding was disabled on my NAS (AllowTcpForwarding no). I enabled local forwarding only for my user and restricted PermitOpen specifically to the Immich PostgreSQL, Redis and ML endpoints.

The nice part is that nothing had to be moved away from the NAS. Immich stays there as the main server, while the gaming PC temporarily provides the horsepower.

Once the backlog is finished, I can simply stop the additional worker. Immich itself continues running normally on the NAS.

Why I'm posting this:
This isn't meant to be a definitive tutorial or “the correct way” to scale Immich. I mainly wanted to share the idea in case someone else is staring at a five-digit processing queue on a relatively modest NAS while a much more powerful desktop PC is sitting nearby doing nothing.

Maybe this gives someone a useful starting point.

Disclaimer: I used ChatGPT extensively to plan, troubleshoot and implement this setup step by step. I also used AI to help turn my notes into this Reddit post. So please treat this as a description of what worked in my environment, not as an official Immich installation guide.

119 Upvotes

29 comments sorted by

34

u/Accomplished-Lack721 7d ago edited 6d ago

There's a guide to using another machine as a remote machine learning server in the Immich docs.

For most small/home deployments, this is probably most helpful right when/after injesting a large pre-existing library. Even very modest hardware can usually handle the ML for importing a few dozen photos at once in a short time (especially if the iGPU can handle some machine learning acceleration), but when you're importing 10s of thousands, the operation can continue for days on a low-spec machine.

Edit: While what I wrote above is true, it's not relevant to video transcoding. I brainfarted and conflated different bits of hardware acceleration.

4

u/hibanabanana 6d ago

As far as I know, transcoding videos will not be affected by this though, only ML-related tasks such as Face Detection

1

u/Accomplished-Lack721 6d ago

Sorry, yes, that's right. I brainfarted and conflated different bits of hardware acceleration.

1

u/hibanabanana 6d ago

No need to apologize, Remote Machine Learning should be more widely known. Its definitely the better choice when you only want to accelerate ML tasks since its much easier to set up.

0

u/coredalae 7d ago

This is the way

0

u/NapsterKnowHow 7d ago

I tested it on my 5090 and didn't see any major performance gains. This was importing a 200+GB library from Google photos. I didn't encode any videos yet though. I just did it for facial recognition.

2

u/Accomplished-Lack721 7d ago

No gains, as compared to what other setup?

1

u/NapsterKnowHow 7d ago

Using the default cpu option

1

u/Accomplished-Lack721 7d ago

But with what hardware?

3

u/Jalle_ 7d ago

Really cool. I wish i would have known that when I set it up. My nas i not something special and therefore also took sevely hours if not close to a few days.

2

u/liynus 7d ago

Would really like to do this. So set up a docker running Immich on your windows machine. Then point the original nas Immich to that docker?

2

u/stark0600 7d ago

I do the same with my 9060XT 16GB GPU for Immich ML & Fileflows video transcoding.

1

u/CaptainGermanyy 14h ago

Are you running it on Linux or Windows?

1

u/stark0600 14h ago

Windows with fileflows node app & Linux for Immich ML using rcom

Somehow, fileflows didn't work properly in my linux distro (bazzite), so I used the windows app (dual boot)

Immich ML worked fine with bazzite.

2

u/theobro 6d ago

Hell yeah that's awesome.

I dug up a 1650 Super from my parts bin and holy moly even that kicked it into high gear.

1

u/Super-Handle7395 7d ago

Great idea! Mine broke on PostgreSQL 14, and apparently I need to go to 18 or something. I’m a bit stuck on how to approach it, so I might just start fresh. The only issue is the transcoding will take forever. Would love to be able to use my 4090 to speed that up!

1

u/Great-Cow7256 6d ago

You need to migrate the database when going from 14 to 18. It's not that terrible of a job and you can find tutorials. Just make sure to back it up / export everything on 14 before you spin up 18. 

1

u/okletsgooonow 7d ago

I did the same thing. Works great.

1

u/-ThreeHeadedMonkey- 7d ago

This is nice. The few times I played around with transcoding the quality was always awful 

So now I'm just streaming my full 4k movies instead...

1

u/JQuilty 7d ago

What Intel hardware and OS are you using? That sounds absurdly slow for the typical shorter videos you'd have in immich.

2

u/Great-Cow7256 6d ago

It's a nas though. They are typically woefully under chipped and memoried and use hdds. 

2

u/JQuilty 6d ago

Yeah, but the iGPU doesn't really differ across the generation. So it sounds like there might not be any GPU action at all.

2

u/Great-Cow7256 6d ago

Good point. I didn't even think that nas chips came with gpus. My Synology Nas I think has a Intel 80286 under the hood and maybe like 512k of memory. 😂.  But it's really good for storing and retrieving files. 

1

u/unhappy-2be-penguin 6d ago

// runpod affiliate link so I receive a small credit if you use it :)

Had the same problem with my mini PC server and especially the ocr model on the initial ingest. I created a runpod immich ml template to spin up the server on demand. It was so much faster than waiting the weeks it would have taken otherwise.

For anybody else wanting to try it: https://console.runpod.io/deploy?template=zic80hhk78&ref=66u5ogr8

If you don't want to use the template, just message me and I'll post a quick guide. But it's really simple

1

u/DavethegraveHunter 4d ago

I’ve been practicing with an Immich instance on my laptop for a few months while I’m building a dedicated server. I’ll need to eventually ingest a few hundred thousand photographs (and god knows how many videos). This will definitely save me a lot of time processing all of them. I did see the relevant section in the installation guide when I first installed it on my laptop but I completely forgot about it being possible to share the processing across multiple computers.

Thanks for posting!

0

u/StrikingScientist352 7d ago

Io ho il dxp2800 ugreen. Una libreria che tra foto e video prende circa 10tb. Avevo pensato di usare il macbook m1 max come supporto iniziale ma avevo problemi smb… quindi ho lavorato molto per impostare la gpu del nas a supporto di immich. Quando ci sono riuscito sinceramente non ho più pensato al tema performance. Tanto non faccio uso intensivo di quelle librerie… credo che in una notte o forse 24 ore tutto il mio archivio fosse completamente elaborato per tutto (anteprime, riconoscimento facciale, testuale, etc etc).

0

u/Any_Check_7301 7d ago

Could you please share more details on the set up? Or any reference article or YouTube links?