wildly fluctuating FPS

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
ronzo
Posts: 6
Joined: Thu Jun 01, 2023 7:22 pm

wildly fluctuating FPS

Post by ronzo »

Hi All,

I see my fps change from low 1s to 14.
It tends to stay around 10fps, but then will mysteriously drop to around 2 or 1.
this is despite low cpu, low ram and low network utilization...

I have spent quite a bit of time trying to track this down, but sadly, have failed.
i am using an old foscam (fi8910w) webcam as remote/modect
640x480 b&w
cpu load rarely ever reaches 1.0

some of the things that i tried:
setting it to ffmpeg (instead of remote)
turning logging to bare min.
setting swappiness to 1 (2.5g of ram being used)
setting most 3 zones with max zone being 27% (active/alarmed pixels/20,0/5,5(disabled)/27(disabled)/5/9.21(disabled)/7.67(disabled)/1(disabled)/0/0
the other two zones are set to inactive

Any ideas as to what could it could be, or how i can debug this?

Thanks!

Ron
User avatar
iconnor
Posts: 2862
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: wildly fluctuating FPS

Post by iconnor »

Which fps? What is reported on console or what is reported during live viewing?

Cuz there are three on live viewing, capture fps, live view fps and analsysis fps.
ronzo
Posts: 6
Joined: Thu Jun 01, 2023 7:22 pm

Re: wildly fluctuating FPS

Post by ronzo »

sorry, i was talking about the console view.
that value is reflected when i get a modect event i.e. if it shows as 1 fps and the event last for 10 seconds, i will get only 10 images.
The thing that baffles me, is that there doesnt seem to be any correlation to the server's cpu/ram/network load AND... the next time the web page refreshes it will sometimes jump right back up to 10+ fps!

I don't think i reported my buffer settings, but they are as follows:
20;60;0;30;20;10;1 - 14.625MB of 32.25MB
FWIW, i was noticing the same behavior with the default settings.

Thanks!

Ron
ronzo
Posts: 6
Joined: Thu Jun 01, 2023 7:22 pm

Re: wildly fluctuating FPS

Post by ronzo »

Latest update in my saga:

I noticed mysql was using too much swap, so i used mysqltuner.pl to analyze and found that my allocations were too high.
I waited a day and re-ran it and it now reports everything is ok (and my swap usage is reduced, too)

STATUS:
zoneminder continues to see-saw between 11 and 1 fps

Update:
bad news: it seems to be stuck at sub 2.0 fps -- somehow tuning mysql made it worse?!?
day 2 of nothing but slowness...guess i shouldn't have tried to fix it!
Attachments
zoneminder.low.frames.png
zoneminder.low.frames.png (33.27 KiB) Viewed 186 times
ronzo
Posts: 6
Joined: Thu Jun 01, 2023 7:22 pm

Re: wildly fluctuating FPS

Post by ronzo »

just dropped to 0.97, same load (sub 1.00) dev/shm at zero.
ps. i restarted zm about an hour ago.
ronzo
Posts: 6
Joined: Thu Jun 01, 2023 7:22 pm

Re: wildly fluctuating FPS

Post by ronzo »

getting slower and slower, despite my having restarted zm earlier in the day.
it was 0.83, but then shot up to 1.15 when i took the next screen shot.
As you can see, there is almost no load at all on the machine, mysql isoptimized and the server is connected via ethernet.

Any ideas as to what the bottleneck is?
Could it be the webcam?
It's connection looks like this: 2.4 GHz,39,6.5

Thanks,

Ron
Attachments
Screenshot 2023-06-08 at 20-16-50 ZM - Console.png
Screenshot 2023-06-08 at 20-16-50 ZM - Console.png (148.9 KiB) Viewed 146 times
ronzo
Posts: 6
Joined: Thu Jun 01, 2023 7:22 pm

Re: wildly fluctuating FPS

Post by ronzo »

ok, i think i figured it out..
i believe that the limiting factor is the 2.4 GHz wifi connection, boy do i feel stupid!
So, it looks like my choices boil down to: either buy a modern camera or move the router closer to the webcam...
Post Reply