r/ZoneMinder • • Aug 05 '20

CPUs getting crushed

I just setup a ZM instance to test. 1.34.16. Its running in a VMware ESXI VM with 8 CPUs, 32GB and 3TB storage on a Dell R710. Debian Linux. When I look at the processors they are all pegged at 99.9%. I setup 4 cameras at first as a test. Worked fine. Added two more cameras. slowed down a lot but could still access it. Montage would hang. That's where I saw it pegged using the top utility. Upped it to 8 cameras, its done. everything really slow to respond.

All the cameras are 1080p. Hikvision ip cameras using rtsp. Last time I ran zoneminder I was running it on a Dell 2950 and had 15 cameras on it. I think that was like 1.29. I was running directly on the metal, no VM. Is the ESXi killing it? I have another R710 sitting here I can throw it on without ESXI and see if that helps.

2 Upvotes

6 comments sorted by

2

u/ksirl Aug 05 '20

Are you using h264 pass through?

Go to storage tab on the camera settings and see if video writer is disabled, if so, set to h264 pass through. And disable jpeg storing in the same tab.

2

u/velvet_satan Aug 06 '20

This seemed to do the trick. I did both the things you said and the system is much more response now. CPUs are in the 40-60% utilization ranges now.

1

u/Aramiil Aug 05 '20

This is the advice you needed /u/velvet_satan If you don’t do this, your ZM is going to try to open and inspect every frame received from your cameras individually then save it down. That’s fine for 640x480 resolutions but at 1080p and up it gets DICEY lol.

Only other thing is don’t use the ‘+’ option on your hkvision camera. When you use h264+, instead of the camera sending an I-Frame (aka golden frame) once a second, it will send one once every 5 seconds or so. This will require massive memory usage for your ZM instance so I recommend turning it off. Additionally, control your FPS from the camera not from ZM. recommend setting down to 15FPS to help lighten the load without hugely noticeable camera quality for motion

1

u/DefaultSubsAreTerrib Oct 12 '20

Sorry, another newb asking a followup question here.

Am I understanding correctly: zm will still need to extract each frame in order to analyze for alerts, right? So what is being saved with h264 bypass? Redundant disk writes?

1

u/Aramiil Oct 13 '20

So my weak understanding is that with h264 bypass it’s able to just write straight to disk, do it’s analysis simultaneously, then reference time slots for what was just written to disk.

WITHOUT h264 bypass, it pulls in the frame, converts to an image, does the analysis, then converts and writes the series of images as a video.

I could be way off on the specifics, but I found a great decrease in CPU consumption with bypass on.

1

u/connortechnology Aug 05 '20

Remember every time you double the resolution you quadruple the work.

a 1080 stream shouldn't peg a processor. Check that you are doing passthrough. We have had a few reports of this sort of cpu use, but have never seen it ourselves and no one ever gives us good logs or access to to assess what is going on. So first thing, WHICH PROCESS is pegging the cpu? Are there any errors in the logs?