Issued the PROBLEM !!!! its not a firefox problem.

Support and queries relating to all previous versions of ZoneMinder
Locked
User avatar
victor_diago
Posts: 245
Joined: Wed Jan 21, 2004 2:44 pm
Location: Brazil, sao paulo
Contact:

Issued the PROBLEM !!!! its not a firefox problem.

Post by victor_diago »

hi all and phil,

remember when ive said that firefox cant handle many cameras at high fps ? well, i was wrong. ive did lots of tests in a test system with zm 1.20.1 about comparing performances and other issues....

see -> (http://www.zoneminder.com/forums/viewto ... ht=firefox)

well, ive got some very interesting results and has my answer....


my system is -> amd sempron 2.2, 256 MB memory, 128 MB shared (kernel.shmmax) two bt878 (with 4 input each) capture cards and a Geforce-4 video card. my motherboard is a pcchips with lan/video(disabled in my case) and sound (disabled too) onboard and running 2.4.29.


ive had some problems in the past using montage in firefox. my problem was that when showing the montage with 8 or more cameras, it freezes from time to time... well, now i have my answer about that (and some little others questions).

my capture cards are capturing all the cameras at about 5 FPS, i have these default settings for all the cameras :

ring buffer : 50
warmup frames : 5
pre event buffer : 5
post event buffer : 10
Alarm frame count : 5
image Blend%ge : 10

so, this means that when motion detected, should record one second before, two seconds after, and only consider motion when at least one second of movement has been detected;

well, after configuring the firefox with the well know parameters, ive tried a lot of different configurantions , lets see..

All 8 cameras configured as monitor
-> 98 % of processor idle

All 8 cameras configured as monitor AND with montage in firefox
-> 28 % of processor idle. ABSOLUTELY NO FREEZES, AT 5 FPS.


All 8 cameras configured as record
-> 95 % of processor idle

All 8 cameras configured as record AND with montage in firefox
-> 19 % of processor idle. ABSOLUTELY NO FREEZES, AT 5 FPS.

All 8 cameras configured as modect
-> 90 % of processor idle

NOW, THE STRANGE THINGS HAPPENED !!!!!!!!!


All 8 cameras configured as modect AND with montage in firefox
-> 12 % of processor idle, BUT when have the movement takes the entire screen or a big part of it, i have a delay until the motion stops. for example, if i put my camera into a dark room, in the front of a closed window and suddenly opens it, the images are showed correctly for five frames (one second as configured to 5 fps) then freezes, the processor goes to 0 % idle and after 4 or 5 seconds the montage is ok again and processor at 12 % idle again too. then, closes again the window, same thing happens.

i gues that it shows okay the first five frames from the "huge motion" because ive set Alarm frame count to 5, if i set it to 10, after 10 seconds all freezes....

this all does not happens in monitor or record mode. and DOESNT happens in modect mode with all the 8 cameras if the motion was only a little pixels, about 20 % of total screen.

setting my config down from 8 to 4 cameras, the problem disappear

if i run 8 cameras, even at 2 fps, the same freeze happens, just the same way as in 5 fps.

so its not a firefox problem, its something related to processor usage during motion detect...

but now comes the very strange thing, if i make twice sources of the same camera (like two /dev/video0 (0)) and set one to monitor and one to modect, (so i have 16 monitors, 8 in modect and 8 in monitor) and opens the montage only with the cameras set as monitor function, the problem disappear and cpu usage goes to 20 % idle.... WHAT STRANGE !!!!

so, i really think its not a "low processor" problem, but some problem related on how zoneminder deals when modecting a camera and showing it at same time... as ive said, this doesnt happens in record mode.

Phil, does zoneminder deals different from modect cameras to recorded ones ? (i know there is a lot of differences, but i cant think in nothing that could cause that, it seems to be a programming issue, when you delay the showed image until you finish to record a event)

Even, if its really a processor issue, i would like to know, to buy a powerfull one...

Phil and others zm´s gurus, please take a look at this text and say what do you think about...

Thanks for all

Victor Diago
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Just a quick note. Mocord/modetect vs record/monitor
mocord/detect uses zma to analize the catured images for changes and the load can depend on b/w is less load than color, image size the larger the image the more resorces it requirs, and what you have your zones setup for. Analizing images takes alot of processor resorce and memory resorce. This can be extreamly compounded if memory is require the use of swap space.

Record and monitor do not use zma since this setting is not anilizing images and logging events to the database.

And I almost forgot that the higher the fps the more that zma has to work as well.
If you are using blob mode for detect AND are have motion outlined this takes some more resorces as well.
Last edited by cordel on Wed Mar 16, 2005 1:54 am, edited 1 time in total.
Image
Image
3939663646337

It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
User avatar
victor_diago
Posts: 245
Joined: Wed Jan 21, 2004 2:44 pm
Location: Brazil, sao paulo
Contact:

Post by victor_diago »

hi cordel,


yes man, i really agree with you, but how can you explain that even running 8 monitors as modect and THE SAME SOURCE MONITORS running as monitor, and only showing the monitor camera ones, you should increase the processor usage, not degree it , right ????


im really confused man,,,, this seems to be that stories that we hear about ghosts and some other things :)


well, i will keep searching

Thanks

Victor Diago
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Firstly, I don't exactly know how you can run two cameras off the same channel of the same device port? Do that work? Even if it does I think it would probably confuse ZM, though the most likely result is that you still only have one zmc and one zma process but with the zma process running at half the frame rate.

Regarding your lockups, my initial suspicion is that it may be database related. Have you checked the DB to make sure it has no errors? Also it might be worth doing slow query logs. Finally, do you get the same lock up if you stream mpjpegs rather than mpegs? The process used is also identical up to the point where the ffmpeg library is invoked so I would expect to see the same effect.

Phil
User avatar
victor_diago
Posts: 245
Joined: Wed Jan 21, 2004 2:44 pm
Location: Brazil, sao paulo
Contact:

Post by victor_diago »

hi phil, thanks a lot for your answer, as ive said, im very worried !!!

Yes, this works setting two cameras to same source, its in tips section of forum. another thing, the databases are perfect, as i said, runing all the 8 cameras in record doesnt make any lag. and yes, im running in mpjpeg native firefox streaming, not with mpeg....

the image freezes only when you have A LOT of movement in many cameras (if you shake your hand just in front of them)

This is really strange for me :/

Maybe it is a processor issue (i need more processor power), but as ive said, running zm without firefox open (they bot, zoneminder and firefox runs in the same machine) even in modect and 5 fps mode, processor goes to 80 % idle... to be honest, i have never been sucessful using montage with 8 or more cameras in the same machine zoneminder runs;; aways had this kind of problem.

Thanks again for your answer..

Victor Diago
User avatar
fernando
Posts: 240
Joined: Thu Jul 10, 2003 6:00 pm

Post by fernando »

i didnt use much firefox..
i have made this test.
firefox in windows 2000.
using cambozola or mjpeg stream "supported by firefox "
i open montage and see sometimes all ok. when i close montage and keep the firefox open i see the 8 cameras streaming like is a montage open.. but is not. i have to close firefox to kill this phantom streams.

on IE 6 all ok.
Fernando
Locked