-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Detector Support]: Memory usage with openvino #8461
Comments
What version of unraid are you running? |
Unraid Version is: 6.12.4 Docker stats: |
and what CPU is this? |
Openvino was updated in 0.13 so it may be better if vaapi doesn't fix it. Otherwise I'm not sure what we can do as this could be an issue with the driver. |
Will try 0.13 tomorrow :) thanks for the hint. It seems the issue still persists but is much slower now. 3.4GB in round about 4 hours Also saw this issue, which Sounds like its the same behavior: I also can confirm this was not happen before 0.12., If this will help |
I also found something intressting... Current Setup: VAAPI HW Accel, recording and no detectors When i Check docker stats its reporting 6GB Out of 10GB are used When checking htop only 3.75GB are used on the whole Host. But some minutes before the Crash i have oom Messages in my syslog from ffmpeg. (Frigate is the only App which is using ffmpeg on the Server) Edit: Currently everthing testet with 0.12.1 Edit 2: |
you'll need to see what process is using the memory inside frigate |
thats so weird.... Inside frigate: docker stats: why does docker have here 5.3 GB RAM Usage and 270 PIDS??? |
Docker stats may be wrong, nothing inside frigate looks to be using much memory |
But why ist ffmpeg crashing with OOM and shortly afterwards the whole Host? If frigate is not running, the Host ist running stable without freezing or anything else :/ |
We'd need to know what ffmpeg process is using high memory. I'd suggest setting a memory limit in docker so you can catch it and debug |
Already limited it to 10 GB currently, what do you mean with catching the process? |
if frigate is limited to 10GB of RAM and your system has more I don't see how it would be taking the whole host down. What I mean is after you see memory usage is up get a shell in the frigate container and figure out what process (with the command) is using the memory |
Thats a good question, If not the question. Why this ist happening and how this can happen is completely unclear to me. But its the same behaviour every crash/freeze. The Host has 16GB RAM. If i limit frigate to 2 GB the Host will freeze multiple times a day, at 4 only one freeze per day and so on. |
Then I'd suggest following #8470 (comment) |
testing with this config now:
If the issue still persists i will remove the go2rtc block. Thats still possible in 0.13.0, right? Removed everything with detect, hw accel, recording and so on Edit: I assume it could be recording... Edit 2: With QSV (done stable 1GB) With HW Accel (VAAPI) and OpenVINO: (stable 1.2GB): With HW Accel, OpenVINO and Recording (as expected, memory is increasing) |
Testing Results:Without anything: (stable 779MB)
With VAAPI (done stable 1GB)
With QSV (done stable 1GB)
With HW Accel (VAAPI) and OpenVINO: (stable 1.2GB):
With HW Accel, OpenVINO and Recording (as expected, memory is increasing)
|
@NickM-27: The issue persists since 12.X not sure if 12.0 or 12.1 as i updated from 11.X to 12.1 directly. |
How much memory is used by the recordings in /tmp/cache? This doesn't seem unusual especially if your recordings are slower to be moved to the host storage |
Wasn't able to check yesterday, sorry. But as stated in the Documentation i only have a 1GB /tmp/cache as tmpfs and Host Storage is a SATA SSD so it should be fast enought in my opinion. But can test it and let you know the results. Meanwhile my Host crashed again, without recording, but with OV, HW Accel and Snapshots. Therefore i will test again anything and let it run some days to see if its stable or not. Probably as you already statet it's just a docker stats issue and it not directly involved into the crash. |
Users have found in the past that updating the kernel and intel drivers on the host fixed crashes |
So after 2 Days without Recording and OV everything running stable, will activate Recording today and let it run some days. Will check if there is a possibilty to update the intel drivers in unraid. But HW Accel is also using the GPU and this setup is running stable. Am i right, that this shouldn't be the case if there are driver issues on the host? |
Not necessarily, OpenVINO and hwaccel access different parts of the GPU and use them in different ways, hwaccel working while OpenVINO doesn't is not uncommon. Here are a couple references to similar issues where driver or kernel fixed: |
That makes sense! But its regarding HW accel so i'm not sure if it also counts for openvino... Changing kernel will be a little bit challenging in unraid, so this is not a real option. |
The same driver is always used for openvino. I've used a coral in unraid for multiple years without any issues |
@NickM-27
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the problem you are having
If i active openvino my memory is increasing until the server will crash.
I already limited the frigate container to 4GB and now to 10GB. Currently the RAM usage is around 4.5GB but is still increasing...
I also enabled swap an saw that frigate.detector.ov is swaping some GB.
docker stats:
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
d587b6e17194 frigate 23.03% 4.802GiB / 10GiB 48.02% 5.88GB / 302MB 1.41GB / 5.95GB 285
Version
0.12.1-367D724
Frigate config file
docker-compose file or Docker CLI command
Relevant log output
Operating system
UNRAID
Install method
Docker Compose
Coral version
Other
Any other information that may be helpful
No response
The text was updated successfully, but these errors were encountered: