[SOLVED] ZM not taking advantage of system's resources

Support and queries relating to all previous versions of ZoneMinder
Locked
FuriousGeorge
Posts: 24
Joined: Fri May 02, 2008 7:48 am

[SOLVED] ZM not taking advantage of system's resources

Post by FuriousGeorge »

[SOLVED] Turns out if you set it up right, the frame rate is just fine, and the load is very low on modern hardware.

What follows is the original post.

-------------------------------------------------------------
I just replaced a 10 year old proprietary system with zoneminder. I'm finding ZM to be superior in almost every way.

One complaint I have is that it appears ZM is not fully taking advantage of my system. My load is under 2 and I have a 4-core CPU, so I figure I'm operating at 50% capacity.

With the old system (A pentium II with 64MB of ram), the feeds were a little smoother than that are with ZM in montage mode. I don't know how this is possible, but I only get around 5fps when viewing my cameras now.

I assume that ff is something of a bottleneck here, since I have more bt848 chips than camera feeds right now, and the cameras report they are capturing at 30fps.

Is there anything I can do to improve performance?

Also, I see only one setting for fps. Must I view and record at the same fps?
Last edited by FuriousGeorge on Mon Jun 02, 2008 5:58 pm, edited 2 times in total.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

zm is different to most systems and the streams are ip based.
So there is no performance benefit to displaying x fps and recording lower as such.

If you dedicate a chip to each cam then it will run at real time if set to, but you may find that you bandwidth is set to low, and as such is limiting your display frame rate.

Low load is good, dont knock it lol, while 4 for a quad core is fine you dont want to go much above it, and when your box is deleting old footage, and 4 monitors get movement you will approcaiate the overhead.

Try using high bandwidth mode and your smoothness will return, but IMO its a waste of resources, 2-5 fps is more than enough per cam for security.

If you want to record at a lower fps you can use mocord or record and use a frameskip, ie assume 10 fps grap, a 9 skip will result in 10 fps live and 1 fps record. (mocord will goto 10fps in alarm record will not)
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
FuriousGeorge
Posts: 24
Joined: Fri May 02, 2008 7:48 am

Post by FuriousGeorge »

Thanks for the reply. I wanted to skip frames to save on disk space, and not necessarily for performance.
FuriousGeorge
Posts: 24
Joined: Fri May 02, 2008 7:48 am

Post by FuriousGeorge »

I think its important to point out for anyone investigating ZM that my load isnt around 2.0 on my Q6600 (quad) anymore. Its now more like .02 when viewing 9 streams at 15-20 fps @ 320 x 240, and recording 1/7th of the frames!

Turns out that those buffer overruns and abnormally exiting zm-related processes that I was ignoring were more costly than I thought.

It seems that perhaps none of the settings do exactly what I want.

I want to view the cameras at 20fps (since 99% of the viewing is done locally, and bandwidth isnt an issue), and record at a fraction of that rate.

My goal is to save space, so if I could get it to record at 3fps ONLY when there is motion, that would be good. We still want to view at 20fps, however.
Last edited by FuriousGeorge on Mon Jun 02, 2008 6:00 pm, edited 2 times in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

FuriousGeorge wrote: My goal is to save space, so if I could get it to record at 3fps ONLY when there is motion, that would be good. We still want to view at 20fps, however.
Then you will want to set a value for Alarm Maximum FPS in your monitor to reflect the same as your max FPS.

For your streaming I assume you have set your bandwidth to high in the web console and in your High B/W settings have adjusted ZM_WEB_H_VIDEO_BITRATE, and ZM_WEB_H_VIDEO_MAXFPS to reflect on your desires?
FuriousGeorge
Posts: 24
Joined: Fri May 02, 2008 7:48 am

Post by FuriousGeorge »

cordel, thanks again. you've been a huge help. The Alarm Max FPS option must have been too obviously near the Max FPS option.

I also forgot to point out that ZM is not at all choppy when in high bandwidth mode, and set up correctly.
FuriousGeorge
Posts: 24
Joined: Fri May 02, 2008 7:48 am

Post by FuriousGeorge »

Whoops! Looks like I spoke too soon.

As James Wilson points out, when an Alarm Event happens, ZM will go back to grabbing at the Max Alarm FPS, and ignore Frame Skip.

My video is very smooth, so the original thread is still solved, and I just made another thread specifically regarding the view/capture fps issue I'm having.
Locked