How much num_threads to set? #2146
-
|
The documentation says that I can create one CPU detector for each camera, but it does not say what to do about the threads. https://docs.frigate.video/configuration/detectors/#cpu-detectors-not-recommended I have 9 cameras with a Intel J4125 CPU (4 threads). I wonder, what would be the optimal configuration using CPU detectors? I'm starting with: detectors:
cpu1:
type: cpu
cpu2:
type: cpu
cpu3:
type: cpu
cpu4:
type: cpu
cpu5:
type: cpu
cpu6:
type: cpu
cpu7:
type: cpu
cpu8:
type: cpu
cpu9:
type: cpu |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
If you start to see inference times increase, you should reduce the number of CPU detectors. The num_threads already defaults to 3. You just have to try alternatives to see what works best. |
Beta Was this translation helpful? Give feedback.
-
|
I made 6 cpu's as I have 6 cores and set threads to 1, brought inference down from 400 to 200 on rockpi 4c running with k3s. still trying to figure out how to use opencl with the mali t860 |
Beta Was this translation helpful? Give feedback.
-
|
I'm getting an average inference of 20 on a Ryzen 3800X with two cameras at 5 fps detection: For giggles I tried a single CPU with 8 threads and my inference went to 30~35. |
Beta Was this translation helpful? Give feedback.
If you start to see inference times increase, you should reduce the number of CPU detectors. The num_threads already defaults to 3. You just have to try alternatives to see what works best.