Reducing CPU load and disk usage

Forum for questions and support relating to the 1.27.x releases only.
Locked
carcachute
Posts: 38
Joined: Wed Jul 23, 2014 12:21 am

Reducing CPU load and disk usage

Post by carcachute »

Hello!

I recently got ZM 1.27.99 up and running on an Intel Atom D510 box with the latest Ubuntu 14. I am using the Linked Monitors feature in order to perform motion detection on low-resolution low-framerate feeds while recording off higher quality feeds. To my delight, it seems to be handling the load reasonably well, but I'd like to reduce the burden on the machine to provide long recording times and cool operation. The cameras are
  • Three D-Link DCS-942L cameras running 640x480 @ 15fps and 320x240 @ 6fps simultaneously
  • One D-Link DCS-2230 running 1920x1080 @ 15fps and 480x270 @ 7fps simultaneously
I'm using MJPEG because I assume that is the least burdensome on the ZoneMinder machine, but the cameras are also capable of MPEG and H.264. I have eight monitors set up:
  • Four low-resolution (320x240, 480x270) @ 6-7 fps for motion detection (MODECT)
  • Four full-resolution feeds set NODECT or RECORD (experimenting with both), linked to the low-res feeds for event triggering
Using NODECT the idle CPU load is less than 15%. Using RECORD it sits at about 65%. The 750GB disk seems to fill up at 5% per hour with all monitors set to RECORD mode. It would be nice to have 24/7 recording in case the motion detection misses something. So, I'd like to reduce CPU and disk usage simultaneously while still getting some semblance of 24/7 recording.
  1. I don't need watermarked headers on the images because my cams handle that. Can I configure ZoneMinder to not decode and re-encode the JPEG frames it gets from the camera? It seems that I could save most of the CPU load that way.
  2. Which is more CPU efficient for ZM to handle from the camera: MPEG or MJPEG? My guess is MJPEG.
  3. I understand the alarm and non-alarm frame rate settings are for analog cams only. Is there an equivalent feature for IP cameras where I can have ZoneMinder skip frames only when there is no alarm, and record the full frame rate when there is an alarm?
Thanks!
attilahooper
Posts: 20
Joined: Mon Feb 15, 2010 6:38 pm

Re: Reducing CPU load and disk usage

Post by attilahooper »

Here is something on zm and h.264, I'd be curious of the results. I believe it's lighter weight than MJPEG
http://www.zoneminder.com/wiki/index.ph ... 2mm_camera
non-alarm frame rate settings are for analog cams only
You sure about that ? I'm pretty sure Max FPS and Alarm Max FPS in monitor general setup is for any camera.
carcachute
Posts: 38
Joined: Wed Jul 23, 2014 12:21 am

Re: Reducing CPU load and disk usage

Post by carcachute »

attilahooper wrote:Here is something on zm and h.264, I'd be curious of the results. I believe it's lighter weight than MJPEG
http://www.zoneminder.com/wiki/index.ph ... 2mm_camera
non-alarm frame rate settings are for analog cams only
You sure about that ? I'm pretty sure Max FPS and Alarm Max FPS in monitor general setup is for any camera.
On my system, CPU usage went up when I used H.264. I do, however, have libjpeg-turbo installed.

The max FPS and max alarm FPS seem to perform frame rate analysis and extra buffering. There are various posts about it introducing significant lag with IP cameras because, with IP cameras, the frame rate is determined by the camera itself. The ZoneMinder Way to reduce FPS with IP cameras (using MJPEG streaming pushed from the camera) is with frame skipping. From the ZoneMinder documentation:

http://www.zoneminder.com/wiki/index.ph ... umentation
Maximum FPS
(Note for IP cameras: ZoneMinder has no way to set or limit the mjpeg stream the camera passes, some cams you can set this through the url string, others do not. So if you're using mjpeg feeds you must NOT throttle here at the server end, only the cam end. If you want to use this feature, the server to throttle, then you MUST use jpeg instead of mjpeg method to get picture from the camera)
Locked