New bare-metal machine for ZoneMinder

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
RonRN18
Posts: 52
Joined: Tue Aug 13, 2019 1:00 am

New bare-metal machine for ZoneMinder

Post by RonRN18 »

I have been using ZoneMinder as a VM on an older Dell R710 running XCP-ng. It has two Intel Xeon processors and 96 GB of RAM physically in the Dell, but I am find that as a VM, it is hogging resources and I also screwed up when provisioning hard drive space, so wanting to start over from scratch. I am thinking of building a dedicated bare-metal machine to mount in my rack for JUST ZoneMinder. At this particular moment, I have six cameras activated but I have about six-eight more cameras I'd like to eventually install. For each of my current cameras, I have a high-resolution and a low-resolution feed and use the low-resolution to monitor for activity, then use that to trigger recording from the high-resolution stream. I have noticed that if I were to try to view a montage, it uses up a TON of processing power. I am thinking that in a dedicated machine, I could use a GPU to offload much of the video processing from the CPU; in a VM, I get no GPU processing.

What I'd like to know is how much CPU and GPU would be recommended. I doubt I would ever go over 20 cameras, but I do see around 12-18 cameras as likely. I can figure out the hard drive storage space issues but just don't know where the sweet spot is for CPU and GPU. Do I need a $500+ CPU and a $2000 GPU or will a $200 CPU and a GPU that is under $400 work well? I will most likely build this into a rack-mount case, as I have a lot of space available in my 48U rack.
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: New bare-metal machine for ZoneMinder

Post by dougmccrary »

MUCH depends on the res and framerate.
Most of my 14 cams are 640x360 at 6fps in Mocord, on a z400 with 6 cores and 12GB, although it has worked on 6GB.
It mostly does OK, except when my house was full of people moving around Thanksgiving it fell behind a bit.
IIRC, iconnor has said 3 cores per camera is a place to start. I wonder if one of those mining machines would be any use...
User avatar
burger
Posts: 390
Joined: Mon May 11, 2020 4:32 pm

Re: New bare-metal machine for ZoneMinder

Post by burger »

dougmccrary wrote: Sat Dec 04, 2021 2:04 am IIRC, iconnor has said 3 cores per camera is a place to start.
Five seconds in forum search for "cores per camera" will give you:
viewtopic.php?f=14&t=30973
iconnor wrote: Thu Sep 02, 2021 2:47 am At 720p 4 camera per real core. At 1080p 2 cameras per core.
Try not to post erroneous information or people are going to think you are spreading FUD and work for the proprietary software companies. Maybe you meant cameras per core...

Regardless, you will get better CPU performance if you use low res streams with modect/mocord/linked monitors and high res streams with record only. Then even the low power arm boards can handle multiple cameras without issue. For example. I have a $500 dollar refurbished server running some 30 cameras. No GPU necessary.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
dougmccrary
Posts: 1172
Joined: Sat Aug 31, 2019 7:35 am
Location: San Diego

Re: New bare-metal machine for ZoneMinder

Post by dougmccrary »

Try not to post erroneous information or people are going to think you are spreading FUD and work for the proprietary software companies. Maybe you meant cameras per core...
:oops: yeah, average was in my head...
RonRN18
Posts: 52
Joined: Tue Aug 13, 2019 1:00 am

Re: New bare-metal machine for ZoneMinder

Post by RonRN18 »

As the original author of this thread, I thought I'd mention that I have finally gone ahead and purchased a new bare-metal machine for Zoneminder. I ended up basing the machine on an Intel Core i7 12th Gen Alder Lake 12-Core CPU with 32 GB of RAM and an Nvidia GTX 1050 Ti GPU. The highest any single core is operating is at 30% with 7 physical cameras, 14 feeds. I am running a low-quality stream as a MoDetect and the high-quality stream as NoDetect, linking the low-quality as a trigger. The GPU reports a utilization rate of about 9%. Basically, my new machine isn't breaking a sweat.

As to the operating system, I was really wanting to use ZFS on Ubuntu for my root drive, which is a 1 TB Samsung 980 PRO SSD but was not having any luck getting it to install properly. I ultimately used the LVM EXT4 model, which gives me a little flexibility if needed in the future. Because there wasn't a repository covering Jammy Jellyfish, I settled on Impish Indiri. For storing videos, I got four 1-TB WD Gold hard drives and set them up in RAIDz (ZFS). As I mentioned, I got the Nvidia GTX 1050 Ti for a GPU. I added the Nvidia PPA for the latest drivers there. I then compiled FFMPEG per Nvidia's instructions. It has been running for about 6 days now.

In this past week, I finally realized why I had issues in Montage. I needed to follow the instructions for Multi-port installation. Prior to this, Montage would essentially freeze up the entire ZoneMinder interface... for everyone, even if connecting with a different machine. After changing to the multi-port installation, I have no issues at all. Now, I need to add several more cameras. My wife has several new cameras she wants me to install. Most of my cameras are PoE cameras, but there are a couple of locations where running Ethernet wiring may be extremely difficult or ugly. I'm contemplating some WiFi cameras but unfortunately, so far, all of the ones I'm finding don't seem to work on 5 GHz, which is most ideal due to bandwidth.
Post Reply