ZoneMinder / zoneminder

ZoneMinder is a free, open source Closed-circuit television software application developed for Linux which supports IP, USB and Analog cameras.
http://www.zoneminder.com/
GNU General Public License v2.0
4.82k stars 1.19k forks source link

High CPU Usage causing reboot with 126 IPCs #3972

Open zzyyzz1992 opened 3 weeks ago

zzyyzz1992 commented 3 weeks ago

Describe Your Environment

Describe the bug I have 126 H264 onvif ip cameras previesly handled by a hardware NVR, now I'm trying to migrate all the cameras to zoneminder, when using record mode (Video Writer set to Camera Passthrough) without 'Decoding Enabled', CPU workload is below 10, Mem usage is around 12GB, networking(RX) is about 24MiB. Everything was fine.

But when using record mode with 'Decoding Enabled', the zoneminder quickly consumes all my CPU and Mem, then the Swap(2GB) , all happens in just dozens of sencond, after that it seems the zoneminder got restarted, and again consuming, restarting .... Cuz my zm is in a vm, so I enlarged the Mem to 256GB(My physical machine has dual amd 7601 32cores and 512GB Mem), but the zm just quickly consumes all resouces and couldn't avoid timelessly restarting.

I just wondering that the cause is my configure wrong, or something else? Dose a discrete GPU help(I got a dust-eating GTX1060)? The reason why I want turn 'Decoding Enabled' On is that I want to browse my IPCs livestreamly(not all at same time, maybe 2 or 5 at the same time), even without audio, which I can bear.

Excuse my bluntness question and poor English:)

I'd appreciate your help!

welcome[bot] commented 3 weeks ago

Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template!

connortechnology commented 3 weeks ago

126 cams is a lot. You don't mention resolution, but at 720p we generally assume 4 cams per core if doing motion detection.

Do you need decoding support? You can install rtsp2web or janus and use direct from camera viewing, removing the need for decoding. Also there is the keyframes only or ondemand decoding.

You might want to consider purchasing a few hours of support from us to help get this tuned in.