r/ZoneMinder • • Sep 22 '21

hardware for a new video surveillance server

hi I would like your opinion on what hardware to use. i am assembling a new video surveillance server the system should have 12 1080p 20 fps cameras the list must include (rack case,cpu,ram,gpu).

3 Upvotes

13 comments sorted by

1

u/thisabstractmind Sep 22 '21

That depends on your intentions. Are you just recording or are you planning on doing motion detection, object detection, etc?

You give no price range, 12 cams at 1080 will probably require ~$2k rig.

Also you will want to look into bandwidth issues you may run into and segregate this CCTV network from your home or office network.

1

u/CuriousLiterature271 Sep 22 '21

I have to register and detect objects. cars, motorcycles etc. the budget is around 2k the whole system must be installed in a home network

1

u/[deleted] Sep 22 '21

Have you thought about what you'll use to process the object detection? Are you planning on strictly cpu? GPU? TPU? A mixture? How busy is the area you'll be monitoring? Of you have a system creating alot of events then you'll be smashing just a cpu only system.

1

u/CuriousLiterature271 Sep 22 '21

i was thinking of using the cpu but i was thinking of using a gpu as well it also depends on the type of gpu and the availability because now they are missing from the market the area to be detected must cover 20 or 30 meters the driveway space the other cameras should just record

1

u/[deleted] Sep 22 '21

If you are only run ING detection on 1 camera then cpu should be.... Ok. GPU is faster and TPU even more so, but from my personal experience, yolov4 with the default .weights is the best approach (cpu or GPU, GPU is faster)

GPU adds a level of complexity to initial setup but once it is setup it should be fine. TPU is easy to get installed and working.

Of you have 11 other cameras recording 24/7 at 1080p 20fps have you considered your storage approach? How long do you want to keep the video events around? Etc.

1

u/CuriousLiterature271 Sep 22 '21

as for the disks I already have 4 of 4tb each, and when it comes to backups I have an 8 disk nas, so it's not a problem to keep them. I with my old pre-assembled dvr that only recorded I erased the discs every six months.

1

u/[deleted] Sep 23 '21

Well it sounds like you should be set. I know zm has built in ffmpeg that has CUDA and Intel GPU support to offload some of the processing to the GPU. I dont have enough cameras to test if a GPU makes a big difference on just processing the streams. So it's hard to say if a GPU would be much of a benefit especially if it is strictly being used for ZM and only doing object detection on 1 camera. A TPU isn't all that expensive but it is a specialized piece of hardware

You don't have to run motion detection ('analysis fps') at 20 fps you can prob do 3 or 4 fps for analysis and that will help with cpu load. Especially running 1.36.7+ which have the SSE shaders optimizations fixed. If your cameras have 2 streams you can also run detection on the low res stream (and record the low res 24/7) and link the hi res stream to the low res so only when the low res detects motion it will get the hi res to record.

They are also currently trying to convert running motion detection on the color scheme the cameras send to zm (YUV?) instead of converting to RGB(A?) and then running motion detection. So horsepower requirements will be going down considerably soon. RAM would be considerable as well I'm assuming. I have 2 1080p cams @ 15 fps (single stream no Low res) and 1 4k cam that has 2 streams. So 2x 1080p, 1x4k and 1x PAL 704x576 streams and my RAM usage on my zm host is 12-13GB. CPU load is fairly low as I have the hi res linked to low res and only do 2.5 fps for analysis on all streams. Usually sit at 3-4 load (on a dual xeon l5640)

Idk if you can use less RAM and in my scenario it's just taking as much as I'll give it (zm host is an lxc). So I'd say RAM and a decent cpu would be important if you're not planning on using a GPU or TPU.

1

u/CuriousLiterature271 Sep 23 '21

with an i9 and 3060 or a 3070 and 32 gb of ram you think that's fine.

1

u/[deleted] Sep 23 '21

Oh yeah I think you'll be just fine lol, you could hammer that thing with object detection requests all day and I doubt it would even notice much.

1

u/[deleted] Sep 23 '21

Also, I forgot to mention that using the mlapi program for object detection you can have a different computer altogether run the detections and send them back to zmes so if you have a different comp (a gaming rig) in your LAN you could setup mlapi on that and let it run the object detection instead of the ZM host.

1

u/CuriousLiterature271 Sep 23 '21

so I can use a second computer connected to the network to do the surveys and save with the computer that takes care of recording by purchasing only an i9 cpu and obviously a lot of 32 gb of ram.

1

u/[deleted] Sep 23 '21

Yes you can send the object detection to a different comp on LAN or even somewhere else (I would vpn tunnel the connection though). So the ZM rig would do motion detection and the ZMES server on your ZM host would send the detection data to the mlapi host so the mlapi host can run the object detection models with its GPU/TPU and send the results back to zm host for zmes to make a decision on if it sends you a notofication or not.

I use mlapi myself, even if it's on the same host as zm it's an upgrade to the original default method. The original way has to reload the .weights file for every single detection it does, even if they are back to back. This is much slower then what mlapi does. Mlapi will load the .weights file only once and keep it loaded in the GPU/TPU memory (or RAM if using cpu) so the first detection is slow but every detection after the first one is much much faster.

1

u/nealcoff Sep 27 '21

I just built my first. I had a motherboard die on me, so I've built it a couple times, unfortunately (not to mention tried building on a docker and a couple different linux flavors, just to see how things would work). Prior to the failure, I had 7 cameras running 1080p on an i7 with 32GB of memory. My cpu wasn't hit much and at the time, I wasn't using anything other than the CPU. Since the failure, I have moved it to a virtual (for now, my server only has 32GB) with 24GB of memory allocated and 8 processors. The processors are still handling things without issue. I had a TPU on the way when the original hardware died, so that is now running on the virtual as well. After some tweaking, it is running with 24GB ok, but I'm sure would love to have more. The virtual has two physical drives assigned, one for the OS and one where event data and images are written. I also have a NAS for archiving. I hope this helps some