Page 4 of 6

Posted: Fri Dec 09, 2005 2:23 pm
by jameswilson
phil i have had another ides
can i create a directory maybe /var/www/hetl/live/
and in here have jpgs created and over written called <monitornumber>.jpg
It seems i can pull jpgs through apache much fater and at lower load than zms. I understand why this is, but wondered if there would be an issue with pulling images of a file that was about to be overwritten etc etc. Would this work if so how do i get zm to make the images

Posted: Mon Dec 12, 2005 10:10 am
by jameswilson
is the above possible?

And obviosly gonna try mmx. FYI i have incresed the jpg compression on streamed images (from 90 to 80) and the load has dropped, does this point towrds jpg encoding/decoding issues or netword. ALso i have (with brainbox corey's help) got phpsysinfo on it. It the network counters get to 4gig then error and start again
Canonical Hostname localhost
Listening IP 10.129.5.211
Kernel Version 2.6.12-oci4.mdk-i686-up-4GB
Distro Name pclinuxos Linux release 2005 (Texstar) for i586
Uptime 3 days 9 hours 0 minutes
Current Users 0
Load Averages 8.17 6.23 5.99



Network Usage
Device Received Sent Err/Drop
lo 11.43 KB 11.43 KB 0/0
eth0 355.37 MB 308.82 MB 5/11


Posted: Mon Dec 12, 2005 10:14 am
by zoneminder
Pulling a constant file is possible but needs to be implemented so that ZM isn't writing to the file as your app is reading it. So ZM would have to write to a temporary and then rename it it or something along those lines. It would probably increase the load on the ZM box if ZM had to start writing jpegs that it otherwise wouldn't bother with though.

Phil

Posted: Mon Dec 12, 2005 10:19 am
by jameswilson
the reason i ask is that i ahve had issues with zms taking the same monitor twice +. If i have say a 500ms refresh rate and have 8 cams, make the 9th a copy of mon 3 mon3 on both seems to stall, im thinking of making zm4ms only take to 8 streams(if you can call them streams i dunno) and make a 9th itself to help load on the server. What i dont understand is if i disable the ip cams this thing move ie 16 cams and a load of maybe 0.8 - 1.2 whislt using zm4ms too. As soon as i enable the ip cams it virtually dies. Could it be a lib problem or is 5 a max for ip cams on zm?

Posted: Mon Dec 12, 2005 10:25 am
by zoneminder
There is no fixed maximum but perhaps it's tipping over an edge. However 5 doesn't seem very many. I was looking at a site over the weekend with 13 or so which was running at a very small load.

Phil

Posted: Mon Dec 12, 2005 10:27 am
by jameswilson
ok i must having something wrong somewhere, they are 640x480 though, and in mocord mode but record makes barely any difference though. I started wondering at first if i had a prob witht he raid as it seemed to only write 1 meg a second, but victor asked me to do a hdparm thingy and it shifted 90meg a second write over 4 seconds so i think the array is fine.

Posted: Mon Dec 12, 2005 9:26 pm
by jameswilson
i think this is a jpeg issue as i have set a new monitor of an existing and it nails the machine, and 100% the proc. So it appears the limit is reached with jpeg's when its out of processer power, as the jpeg take so long to process the whole thing starts to queue, it also appears in top that the jpegs cause the system % to increase not the user. I assume this is because the jpegs are processed by the 'system' not zms or zma/c

Posted: Fri Dec 16, 2005 3:23 am
by jameswilson
right then after extensive research i have decieded that using zm4ms and very low compression on the axis's is the problem. I am gonna do a site visit and increase the compression of the jpg's from the cams as im assuming smaller file sizes will be easier for zm to deal with. This (again im assuming) will also lower the file sizes for zms and im hoping lower the load.
Also i think you are right now, the work required to get zm4ms to do raw images will be worth it. I havnt got a clue how im gonna deal with raw images but im assuming somone has done it before with .net so i should be able to too, (google is my best mate).

Im assuming it will be another tpe for zms to handle and i will just alter the path statement to get a differnt type of image, and then deal with it somehow?

James

Posted: Sat Dec 17, 2005 11:06 am
by zoneminder
Yes, it will just send the raw image data, so the data transfer size will be higher, but there will be no CPU expended in compressing the images before sending and none at your end decompressing. ou should be able to map them directly to your screen buffer.

Phil

Posted: Mon Dec 19, 2005 12:54 pm
by jameswilson
update,
it appears some cretin (me) enabled hyperthreading on a non smp kernel

loads were huge as previoyus posts upto 20
chnaged the fps of the ip cams to 1 fps and this helped but not massivly (was still on loads of 5-8)

rebooted turned off hyperthreading (and made a modest overclock now running at 3.4 Gig)
loads now 1-2
will up the fps in the next sday or 2 once i know its stable and report back.

James

Posted: Tue Dec 20, 2005 10:44 pm
by zoneminder
Good. Hopefully that will be a permanent fix but let us know. You are doing a ton more testing of this kind of thing that I ever do here :)

Phil

Posted: Tue Dec 20, 2005 11:06 pm
by jameswilson
well i upped the fps back up to 2 per ip cam enabeled another 4 ip cams taking the total tally to
16 med res bttv cams
7 640x480 axis 206 at 2 fps
load is now around the 2-3 mark with 2 users perm connected via zm4ms (these users load all 24 cams up and leave them there day and bloody night.)!!
processor now sits at arounf 40% user 7-9% system 0-1% io wait and 50% idle
before i was lucky to have 1% idle (poxy HT technology)!!

I will let you know what happens when the disks fill up gain as they are currently at about 52%

Posted: Mon Jan 02, 2006 11:53 pm
by jameswilson
well bad news its back.
It runs great for about a week i checked in yesterday and the load was upto 12.
So it wasnt ht
I obviously have something that consumes everything but as i cant get top to run remotly then i cant see what it is

Posted: Tue Jan 03, 2006 1:17 am
by jameswilson
i think thi smaybe related to the number of events stored as it was ok when the drive was below 70% bow its slow again. Is this likely (1.21.3)
I have been waiting now for 15 mins for the console to open. from memory though it has in the region of 70000 events stored (24 cams set to modect on 15 min evnt time.

Posted: Tue Jan 03, 2006 10:09 am
by zoneminder
It may well be related to events I guess. As a disk fills up it may take longer to locate free space for new files and longer for the database to rewrite table files etc.

You mentioned that you have cameras set to Modect with 15 minute times, did you mean Modect or Mocord as if you are consistently getting Modect events longer than 15 minutes it may be that just going to an unconditional recording mode might be better.

You have mentioned before about not being able to run top via webmin. Do you not get the same information anyway from System->Running Processes->CPU in webmin?

Phil