High CPU load in VM on cluster that has no GPUs

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
balzac
Posts: 2
Joined: Thu Aug 18, 2022 6:59 pm

High CPU load in VM on cluster that has no GPUs

Post by balzac »

Hello,

My setup:
  • ZoneMinder v1.34.23
    Debian 11 current
    Running on a virtual machine in ESXi 7.0 U2 on a 5-node G-series VxRAIL cluster (no GPU's)
    16 CPUs
    32 GB RAM
Currently running with 13 IP cameras of various manufacturers from 1 to 6 megapixles, all are set to "Modect" with detection zones both active and inactive defined for each.

In studying the FAQ I have tried
  • switching all cameras to 8-bit grayscale
    setting capture resolution to no more than 1280x720
    setting CAPTURES_PER_FRAME to 1
And yet, with all cameras enabled I see consistent CPU load over 8.0 with peaks into the 9's.
/dev/shm sits with less than 1% used.

Can I hope to get any improvement in this performance on a cluster that doesn't have any GPU's available to offer hosted OSs?
User avatar
Andyrh
Posts: 243
Joined: Sat Oct 28, 2017 3:55 am

Re: High CPU load in VM on cluster that has no GPUs

Post by Andyrh »

Frame rate is at lease as important as resolution.
Based on my system, 8 threads, 6 cameras, you are about where I would expect, 50% CPU usage. My system is typically in the 3-4 range doing modect on 54 frames per second.
Andy
o||||o

Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
balzac
Posts: 2
Joined: Thu Aug 18, 2022 6:59 pm

Re: High CPU load in VM on cluster that has no GPUs

Post by balzac »

Well, duh. This is our first cluster I'm used to reading CPU load on a single CPU so I was wholly misinterpreting what the Linux "top" command was showing me.

So year, looks like 50% utilization which is hard to beat! Thank you very much for taking the time to give me feedback on your setup and expectations!
geraldbrandt
Posts: 127
Joined: Tue Dec 09, 2014 10:20 pm

Re: High CPU load in VM on cluster that has no GPUs

Post by geraldbrandt »

I run seven cameras and do all of my motion detection at the lowest resolution of the camera (640x360 ish). I then have a linked monitor at full res (usually 4k) that saves with camera passthrough. I'm running in an LXC container under Proxmox with 4CPUs (i7-3700). My load average is .75 and 7% cpu usage.
pepex7
Posts: 37
Joined: Wed Feb 08, 2023 11:55 pm

Re: High CPU load in VM on cluster that has no GPUs

Post by pepex7 »

geraldbrandt wrote: Mon Aug 22, 2022 4:04 pm I run seven cameras and do all of my motion detection at the lowest resolution of the camera (640x360 ish). I then have a linked monitor at full res (usually 4k) that saves with camera passthrough. I'm running in an LXC container under Proxmox with 4CPUs (i7-3700). My load average is .75 and 7% cpu usage.
what storage configuration are you using?
can you guide me? I'm trying to implement in proxmox
geraldbrandt
Posts: 127
Joined: Tue Dec 09, 2014 10:20 pm

Re: High CPU load in VM on cluster that has no GPUs

Post by geraldbrandt »

pepex7 wrote: Thu Apr 27, 2023 10:30 pm
geraldbrandt wrote: Mon Aug 22, 2022 4:04 pm I run seven cameras and do all of my motion detection at the lowest resolution of the camera (640x360 ish). I then have a linked monitor at full res (usually 4k) that saves with camera passthrough. I'm running in an LXC container under Proxmox with 4CPUs (i7-3700). My load average is .75 and 7% cpu usage.
what storage configuration are you using?
can you guide me? I'm trying to implement in proxmox
So, I've changed things a bit. Linked monitors suck... they fail all the time, record differently than the detection screen. They're just a bad idea.

I still have seven cameras. I capture the hi resolution stream, but tell Zoneminder the capture resolution is 640x360. That means all my motion detection happens on a 640x360 image. When motion is detected, I save RTSP passthrough to disk, which is the highest resolution the camera puts out.

Watching a live stream shows the 640x360 images, so it's not great. I almost never do that, though. Montage view looks great, since all the mages are smaller anyway. I do that a lot.

The end result on an i5-12500 in a VM is .8 load and 10-15% CPU. The system is stable and fast.

My VM storage is to an NFS server over 1Gbe (Synology box). I have no issues.

Any other questions?

Gerald

This camera's RTSP stream is 1920x1080
Screenshot_2023-04-28_07-47-02.png
Screenshot_2023-04-28_07-47-02.png (55.94 KiB) Viewed 1591 times
pepex7
Posts: 37
Joined: Wed Feb 08, 2023 11:55 pm

Re: High CPU load in VM on cluster that has no GPUs

Post by pepex7 »

I have two giant doubts:
1.- How to set up a monitor room? Pc with screens so that you can see the cameras (24/7) and monitor/control from there.

2.- The storage, how to store on the same server (proxmox cluster) how to create or configure the storage so that the videos remain there? From what I've read, I don't know whether to use directory or zfs storage.

Thanks for your help.
geraldbrandt
Posts: 127
Joined: Tue Dec 09, 2014 10:20 pm

Re: High CPU load in VM on cluster that has no GPUs

Post by geraldbrandt »

pepex7 wrote: Sat Apr 29, 2023 12:16 am I have two giant doubts:
1.- How to set up a monitor room? Pc with screens so that you can see the cameras (24/7) and monitor/control from there.

2.- The storage, how to store on the same server (proxmox cluster) how to create or configure the storage so that the videos remain there? From what I've read, I don't know whether to use directory or zfs storage.

Thanks for your help.
I can't help you with 1.

2. I just created a qcow2 disk on my NFS server and the Zoneminder VM mounts it like a regular disk. Fast and easy.
User avatar
Andyrh
Posts: 243
Joined: Sat Oct 28, 2017 3:55 am

Re: High CPU load in VM on cluster that has no GPUs

Post by Andyrh »

pepex7 wrote: Sat Apr 29, 2023 12:16 am I have two giant doubts:
1.- How to set up a monitor room? Pc with screens so that you can see the cameras (24/7) and monitor/control from there.
Depending on what you want this should be easy. I have a touch screen Pi showing montage 24x7. Work reasonably well until Chromium hangs. But that is a PC problem, not a ZM problem.
Andy
o||||o

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