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

Current Development version likely to have breaking changes
Post Reply
renegade2k
Posts: 4
Joined: Sat Jun 17, 2023 1:31 pm

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

Post 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.
renegade2k
Posts: 4
Joined: Sat Jun 17, 2023 1:31 pm

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

Post 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.
pepex7
Posts: 37
Joined: Wed Feb 08, 2023 11:55 pm

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

Post 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).
dougmccrary
Posts: 1271
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

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

Post 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
Post Reply