Best practice / optimizing

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
blaczero
Posts: 29
Joined: Sat Sep 21, 2024 12:19 pm

Best practice / optimizing

Post by blaczero »

Is there a doc or something that makes it easy to understand what I can change to optimize the system?

I just got a Minisforum 773 with 64gig of ram, and I'm already down to 300mb free and .83 load average on the CPU.

I have changed the cameras to 10FPS already. Is it just resolution and image buffer size now?
Last edited by blaczero on Sun Oct 06, 2024 8:36 pm, edited 1 time in total.
User avatar
Andyrh
Posts: 277
Joined: Sat Oct 28, 2017 3:55 am

Re: Best practice / optomizing

Post by Andyrh »

How many monitors?
What is reporting 300 MB of RAM free?

I have 16GB of RAM and 14 monitors. 364MB free and 11,896MB available. So, I am not close to being out of RAM.

Code: Select all

 free -m
               total        used        free      shared  buff/cache   available
Mem:           15896        3273         364         389       12259       11896
Swap:           4095        1367        2728
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
blaczero
Posts: 29
Joined: Sat Sep 21, 2024 12:19 pm

Re: Best practice / optomizing

Post by blaczero »

Andyrh wrote: Sat Oct 05, 2024 2:22 pm How many monitors?
What is reporting 300 MB of RAM free?

I have 16GB of RAM and 14 monitors. 364MB free and 11,896MB available. So, I am not close to being out of RAM.

Code: Select all

 free -m
               total        used        free      shared  buff/cache   available
Mem:           15896        3273         364         389       12259       11896
Swap:           4095        1367        2728
3 cameras right now, top is reporting 300mb free, no swap used. I am about 80% utilization (1 CPU core).

I figured I was setting something wrong, that's why I asked here.
User avatar
Andyrh
Posts: 277
Joined: Sat Oct 28, 2017 3:55 am

Re: Best practice / optomizing

Post by Andyrh »

It is not a bad question.
top reports only the "free" number. free reports all of the numbers.
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
blaczero
Posts: 29
Joined: Sat Sep 21, 2024 12:19 pm

Re: Best practice / optomizing

Post by blaczero »

free reports this

total used free shared buff/cache available
Mem: 63507688 5467172 897008 102244 57977016 58040516
Swap: 8388604 256 8388348

So as far as CPU usage, am I high?
zm-resource1.png
zm-resource1.png (26.69 KiB) Viewed 989 times

Also, I'm at over 1.5TB used in the last 3 days, I've shortened the events to 60 seconds, where else do I optimize that? Can I choose how sensitive the event capture is?
User avatar
Andyrh
Posts: 277
Joined: Sat Oct 28, 2017 3:55 am

Re: Best practice / optimizing

Post by Andyrh »

free is showing a large cache. You have plenty of RAM.
Each zone sensitivity can be set. There are several threads on adjusting zones. It can take a long time to get the first one right, after that the others will be easier. You will have learned a lot. One tip is to use pixels instead of percentage. That will allow for finer control.
Frequently extra disk space is used if you are saving jpegs. I have "Save JPEGs" set to disabled. I enable them when adjusting a zone so I can see what tripped the detection. I am getting around 50 days from 4TB when all 6 monitors are running. 1 is currently down.
I also have "Video Writer" set to Camera Passthrough to save CPU time.

Hard to tell from the screen shot how busy the system really is. I have 12 threads and run in the ~25% range. I prefer nmon for this data, a throwback to my AIX days. You can see ZM prefers the physical cores over the virtual cores, but it will make them all busy if needed. Right now I have 5 monitors doing modect, 5 record and the rest are monitor or down. The frame rate is 10FPS or lower.
Screenshot 2024-10-07 072603.png
Screenshot 2024-10-07 072603.png (44.77 KiB) Viewed 953 times
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
Post Reply