Page 1 of 1

Montage page super-slow with setting "Keyframes Only + On Demand"

Posted: Sun Jun 18, 2023 8:25 am
by renegade2k
As i'm struggeling with high CPU usage fur just a few cams, there someone mentioned it's not that much of a problem in version 1.37, as there is a new option "Keyframes Only and On Demand" and it's true.
My load goes down from like 30% to just 1-2% per cam. Nice!
But there seems to be another big problem with this:
But setting this option and open up montage view, the page seems to crash, but indeed it's just super slow.
It is showing the first view of every cam on calling, but then it seems to never finish loading (you see firefox is trying to load the site) and one by one the images disappear. While this you can try to point at the "console" tab on top. It takes like 1-2 minutes(!) until the point is highlighted. And after clicking it another 2-3 minutes to open the page. As soon as you leave the montage view, everything seems to work fine again.
The most curious thing about that is, that there is no suspicious load on the host system!
The load for the cam processes goes up to 30% again (which is like fine, cause i call for every cams view), but there is nothing markable else, like high load on apache process or such...
Also this problem does not occur when viewing the cams one by one.

Re: Montage page super-slow with setting "Keyframes Only + On Demand"

Posted: Thu Jun 22, 2023 6:14 pm
by renegade2k
After reading dozens of postings with similar problems and even more hits on how to maybe solve it, most of them were like "take a look at multiport" which gives a keyword but does not help that much.
So i googled again and found this: https://wiki.zoneminder.com/Multi_Port which is (for me as beginner) not helpful at all.
And i found this: https://zoneminder.readthedocs.io/en/st ... twork.html which explains what multi-port does, but actually the 3rd hit gives you the needed information on setup: https://medium.com/zmninja/multi-port-s ... 836a336c93
Even tho i didn't think this would help, because i was viewing 5 cams and every article talks about a restriction on 6 simultaneous connections, i set up multi-port.
And, as i was expecting, this didn't help.
For this the error seems not to be my connection to the streams, but something "inside" zoneminder ...
Also another point is, that this problem only occurs, when set decoding to "keyframes + ondemand".
Setting this to "always" results in fine working montage view, but also in high cpu usage as well.
Setting this to "ondemand" results in montage view working, but low fps (like 5 instead of 15) and colorful flickering image.

Re: Montage page super-slow with setting "Keyframes Only + On Demand"

Posted: Tue Nov 14, 2023 7:57 pm
by pepex7
were you able to solve it? It happens to me that the streaming is choppy in zoneminder 1.37.45 (and also in zmninja).

Re: Montage page super-slow with setting "Keyframes Only + On Demand"

Posted: Thu Nov 16, 2023 4:20 am
by dougmccrary
streaming is choppy in zoneminder 1.37.45
This may be fixed in 1.37.47

I've not used "Keyframes Only + On Demand" previously, but just set all mine to that, and don't see an appreciable difference.
Most of my cams are under 10FPS, so that may be a factor. 21 cams and 1.2MB/s, mostly 640x360