Best Practices for Optimizing ZoneMinder 1.36.x Performance with Multiple High-Resolution Cameras

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
Quantum
Posts: 130
Joined: Fri Mar 25, 2011 3:34 pm

Re: Best Practices for Optimizing ZoneMinder 1.36.x Performance with Multiple High-Resolution Cameras

Post by Quantum »

{... and everyone holds their breath ...}

At least turn off jpg. And set one monitor for the hi stream and one for lo. Set hi to NoDect and lo to MoCord. Link hi to lo so it triggers when lo does; hi does not analyze, it only records when lo triggers. Set hi to Camera Passthrough and lo to Encode.

This saves enormous CPU, not analyzing nor even decoding the hi stream, but unfortunately for events does not record object bounding boxes (if you can ever get ML working).

Turn on date/time/text in the cameras, not in ZM. Be sure to get your resolutions right. Check system status using nmon to see whether you're CPU/RAM/Disk-bound.

This is as far as I've gotten.
User avatar
Andyrh
Posts: 300
Joined: Sat Oct 28, 2017 3:55 am

Re: Best Practices for Optimizing ZoneMinder 1.36.x Performance with Multiple High-Resolution Cameras

Post by Andyrh »

Camera FPS is important. You are not making a movie so set the FPS to around 5-10 on the cameras. Also, I set the keyframe to 1 per second.
Not a hard rule, but 1 thread per motion detection works best in my experience.
Camera passthrough is important. This reduces CPU work.
CPU clock rate is important after you have enough threads. Or said another way, I prefer cores over clock.
I have seen many threads about RAM. I have 6 modect cameras and 6 recording with 16GB of RAM. I frequently have 8GB or more free for use.
Hardware RAID controller helps, but may be overkill on my part. 😊
Good HDDs, I like the WD Purples. Any good HDD will do, just avoid the green ones, they cannot take the abuse.
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
mikb
Posts: 691
Joined: Mon Mar 25, 2013 12:34 pm

Re: Best Practices for Optimizing ZoneMinder 1.36.x Performance with Multiple High-Resolution Cameras

Post by mikb »

Original posting was an AI generated/stolen content spammer posting links to gaming sites ...
rcrail
Posts: 11
Joined: Fri Jan 10, 2020 10:46 pm

Re: Best Practices for Optimizing ZoneMinder 1.36.x Performance with Multiple High-Resolution Cameras

Post by rcrail »

Also, I set the keyframe to 1 per second.
Not a hard rule, but 1 thread per motion detection works best in my experience.
Please explain how & where you set the keyframe and "1 thread per motion detection". On the camera or in ZM or both?

Thank you
User avatar
Andyrh
Posts: 300
Joined: Sat Oct 28, 2017 3:55 am

Re: Best Practices for Optimizing ZoneMinder 1.36.x Performance with Multiple High-Resolution Cameras

Post by Andyrh »

The keyframe interval is set on the camera. In my case the lowest value is the FPS setting, so 1 per second. Many other threads about various topics tend to indicate 1 keyframe per second is desirable.

I have run ZM on several systems through the years. Anytime I had less than 1 thread per motion detection ZM would sometimes loose a few frames at the beginning of an event. This is my personal rule that has not been adequately tested to be a general rule. To get 1 thread per camera "simply" buy a CPU with enough threads. I am currently running a 6 core Xeon, so 12 threads, with 6 monitors doing modect.
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
rcrail
Posts: 11
Joined: Fri Jan 10, 2020 10:46 pm

Re: Best Practices for Optimizing ZoneMinder 1.36.x Performance with Multiple High-Resolution Cameras

Post by rcrail »

Ah, now I understand. Thank you, Andy.
Post Reply