Reduce memory/CPU requirements in ZM 1.36?

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
klui
Posts: 9
Joined: Wed Oct 26, 2016 11:16 pm

Reduce memory/CPU requirements in ZM 1.36?

Post by klui »

Ever since I upgraded from ZM 1.34 to 1.36 my VM has been sluggish and often unresponsive--can't login through webUI nor ssh into the system.

I allocated 6 vCPUs and 8GB of memory and it's been a lot better. My old settings were 2 vCPUs and 3GB memory and I was able to stream from my cameras at 1080p without any issues. Even with the current setting I need to use my cameras' 720p streams on 1.36 otherwise I get a lot of blue screens due to no signal from my 7 cameras.

What default settings have changed between 1.34 and 1.36 that requires more memory/CPU? My installation just has streams feeds from an analog security system. There is no processing done. i.e.: I don't save any video, the analog system does that.

If there's no resolution I'll probably revert back to 1.34.


Thanks!
klui
Posts: 9
Joined: Wed Oct 26, 2016 11:16 pm

Re: Reduce memory/CPU requirements in ZM 1.36?

Post by klui »

Here's an update to this post.

Last night I decided to upgrade the OS from 18.04 LTS to 20.04 LTS. During the upgrade there was a problem phpmysqladmin and I aborted that package--I couldn't recall the password for that database. It broke mysql/mariadb so Zoneminder didn't work either.

Nuked the site from orbit and started from scratch: 20.04 LTS and ZM 1.34.

Below are the monitor graphs from 1.34 to 1.36, then back to 1.34. It's clear right after upgrading from 1.34 to 1.36, memory usage increased. It wasn't too bad but the VM was immediately very sluggish rendering the login page and ssh takes 10-15 seconds along with not being able to stream at 1080p. After several days the VM would be non-responsive forcing a reboot. Sometimes there would be kernel messages stating zmc ran out of memory and that process killed. That was when I changed the VM's allocated memory from 3GB to 8GB. The graph clearly shows 1.36 needs 4-7GB. But sluggishness was still there and zmc still runs out of memory on occasion. The VM hangs less but I was not happy with not being able to stream at 1080p. Reverting back to 1.34 fixed all of the issues. I also removed 2 vCPUs and decreased allocated memory to 4GB.

Image

Historically I've always had "error while decoding frame" entries in the log and finally found a link to @rockandroller's post at viewtopic.php?t=24586 and resolved it by changing my cameras' Source Type from Remote to Ffmpeg.
klui
Posts: 9
Joined: Wed Oct 26, 2016 11:16 pm

Re: Reduce memory/CPU requirements in ZM 1.36?

Post by klui »

The issue with things not working on 1.36 didn't sit well with me so I spun up a new VM and tried 20.04 LTS and 1.36. Unsurprisingly my cameras worked at 1080p. My old installation was up for over 5 years so probably something was misconfigured causing a conflict with the initial 1.36 upgrade.

It's clear 1.36 uses more memory, ~100%, than 1.34 and a little more CPU, ~25%. Left is 1.34 fresh install vs right 1.36.

Image
Post Reply