Repository navigation
Replies: 3 comments 8 replies
|
Hi @PaulW08 This sounds the same as the recently reported and fixed #143 Please try this build and confirm it fixes the issue for you: https://releases.fregata.app/beta/Fregata-BETA-segment-copy-perf-f544c6cfa.dmg If it fixes the issue, and you added the SSD cache specifically to debug this, you can probably remove the SSD cache. This fix is scheduled to go out in v0.18.3.1 once the rest of the release is ready. |
|
I have some additional data. The issue is still intermittent, but the latest logs make me think the two recording move slots are not the underlying bottleneck. During one slow period, copy times climbed to roughly 2.5-6.5 seconds and the queue grew:
Frigate then began discarding recording segments because the cache couldn't keep up. Without any configuration change, the very next cycle processed: segments=84, moved=84 (426.2 MB), waiting=0, timed_out=0, slots=2 Average copy time dropped to 301 ms and the entire backlog cleared in about 17 seconds. I've now seen this pattern more than once. In an earlier occurrence, copies were taking 18-31 seconds, including 30-second record-move timeouts. Then performance suddenly recovered and the same two slots moved 84 segments / 462 MB in 8.4 seconds, averaging 164 ms per copy. The destination is an SMB-mounted Unraid share at /Volumes/Security/Fritgate/recordings. Filesystem operations such as mkdir, exists, and rename also become substantially slower during the bad periods and recover at the same time as copy performance. So at this point this looks more like an intermittent SMB/destination filesystem latency problem than insufficient recording-mover capacity. If there is additional diagnostic logging I can enable to capture exactly what the maintainer is blocking on when this happens, I'm happy to collect it. |
|
Here's the new bundle: FDB-VG52ZJSVW8V6TAP55R10 Hope that helps. Not really seeing anything out of the ordinary on the Unraid end, but not ruling it out either. |
Uh oh!
There was an error while loading. Please reload this page.
Fregata version
0.18.3
macOS version and chip
MacOS 27.0.1 on M6
Diagnostic bundle ID
No response
What are you trying to do?
I am continuously recording approximately 14 cameras from Fregata on an Apple Silicon Mac mini to an SMB share hosted by Unraid. New writes to the Unraid share are sent to an SSD cache drive.
I am trying to have Fregata continuously move its locally cached recording segments to the SMB recordings directory without falling behind or discarding segments.
The recording maintainer frequently falls behind. The copy slots become nearly 100% utilized, the waiting queue grows, and Fregata begins discarding recording segments across multiple cameras. Occasionally individual record moves exceed the 30-second timeout and are killed.
What have you tried?
I have been trying to determine whether this is an SMB/network/storage performance issue or something specific to Fregata's recording mover.
All of the following tests were performed while Fregata was actively recording.
1 GiB sequential SMB test
Small-file SMB test
Local file to SMB test
syncsubsequently completed in 0.125 secondsActual Fregata recording segment test
cpcompleted in 1.103 secondssynccompleted in 0.120 secondsFregata's recording maintainer nevertheless frequently reports individual segment copy averages around 1.5–3.5 seconds, with some much longer stalls.
During one particularly bad cycle:
Recording segments were subsequently discarded across many cameras.
I also performed a full Mac restart. Shortly afterward, a recording-maintainer cycle showed:
I inspected
frigate/record/maintainer.pywhile troubleshooting and noticed that copy concurrency appears to be calculated using:max(2, ceil(camera_count / 15))With my current number of configured cameras, this results in two concurrent recording-copy slots.
I have not modified the Fregata application code.
Is this expected behavior for an SMB recordings directory with this number of cameras? Is there a supported way to increase recording-move concurrency, or could the long-running copy subprocesses indicate another issue with recording to a macOS-mounted SMB share?
Relevant logs (only if you couldn't attach a diagnostic bundle)
Camera setup (if relevant)
Approximately 14 cameras are continuously recorded.
The setup is a mixture of H.264 and H.265 cameras using separate main and detection streams where available. CoreML detection runs on the Apple Neural Engine.
The recording destination is an Unraid SMB share backed by an SSD cache drive. The Mac mini uses 2.5 GbE and the Unraid server has 10 GbE networking.
The issue affects recording segments from many different cameras rather than consistently affecting one camera.
All reactions