Poor performance?

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
kalto
Posts: 3
Joined: Wed Mar 13, 2019 2:24 am

Poor performance?

Post by kalto »

Hi,
I recently decided to rebuild my "old" 1.30.x ZoneMinder server. It has been running correctly for a couple of years but some recent hardware crash seems to have caused some problems. The server was running Debian virtualized under VMware vSphere in my home lab. 2 vCPU, 4Gb of RAM and some relatively fast HD (with SSD cache and tiering).

I decided to migrate to 1.32. Reinstalled a new Debian 9.8 and installed 1.32. Followed the "easy way" on the wiki using the experimental repo:

https://wiki.zoneminder.com/Debian_9_64 ... e_Easy_Way

Didn't work in the end. Seems like the API are broken on the Debian packages, they simply aren't there and I saw some post with people just copying the API from Ubuntu.

Anyway, since most people seems to run ZM on Ubuntu, I decided to go that way. Installed Ubuntu minimal and followed the instruction here:

https://wiki.zoneminder.com/Ubuntu_Serv ... e_easy_way

Install went well and the server is running.

I added my 3 monitors, they are Amcrest camera and I am using the 640x480 substreams at 15 FPS. Used to work well with my previous server.

It works, problem is, it is soooooo slow that it is mostly unusable. The camera usually start around 12 FPS but after some time, ends up around 5-6 and often below 3. If you look at the live view of a camera, you can see it often skip multiple seconds on the timestamp and the video feed can be as far as 1 minute behind real time. Recorded event using motion detect are mostly unusable as they miss so many frames, up to 5 or 6 seconds sometime. I had some buffer overrun log at first, I raised the buffer since then. I am not getting these message anymore but the performance or the result hasn't improved.

The server doesn't seems to be overloaded, load averages are around 0.05, plenty of memory available, disk are totally idle. I also did some testing with only that VM running on a vSphere host to see if there might be some ressource contention with the host, same result.

Any ideas or suggestions?
BaseballSS
Posts: 16
Joined: Tue Feb 12, 2019 8:45 pm

Re: Poor performance?

Post by BaseballSS »

Which camera models are you using? If your cameras stream audio and you are using H264 passthrough, this may be your issue.

Can you post your ZoneMinder monitor settings?
jogo
Posts: 46
Joined: Thu Aug 03, 2017 3:00 pm

Re: Poor performance?

Post by jogo »

My old 1.30 system ran on Debian, too. My current system is running on CentOS 7 and I have a test environment running on Ubuntu 18.4. I did not have any problems installing both systems, but Debian may now be different.

My CentOS ZM system is running under qemu/kvm with 6 CPU cores and I am mostly using Axis and Grandstream cameras (currently 15) with almost full resolution using the h264 interfaces. I needed some special hard disk settings (unsafe mode), but overall the load varies between 0.8 and 2, depending on the circumstances. It seems that the load is a bit higher which may be due to the different handling of the cameras compared to 1.30, but I am generally very impressed by the performance.

Meanwhile I prefer CentOS, mainly because of the Cockpit package.
kalto
Posts: 3
Joined: Wed Mar 13, 2019 2:24 am

Re: Poor performance?

Post by kalto »

BaseballSS wrote: Wed Mar 13, 2019 5:33 am Which camera models are you using? If your cameras stream audio and you are using H264 passthrough, this may be your issue.

Can you post your ZoneMinder monitor settings?
I am using Amcrest IP2M-841. The cameras do stream audio and I am using the H264 passthrough writer. I'll test with the H264 encoder instead.
kalto
Posts: 3
Joined: Wed Mar 13, 2019 2:24 am

Re: Poor performance?

Post by kalto »

Ok, I found a setting to disable the audio from the substream on the cameras. Didn't change anything in ZoneMinder, still using the H264 passthrough and things seems to be working well now.

I don't really need the audio but is there any way to keep it? Any recommandation on H264 passthrough vs X264 encode?

Thank you!
BaseballSS
Posts: 16
Joined: Tue Feb 12, 2019 8:45 pm

Re: Poor performance?

Post by BaseballSS »

You could try your luck at switching from TCP to UDP in your ZoneMinder monitor settings, but this didn't work out too well for me (bad smearing) so I disabled audio as well.

I believe H264 passthrough will produce better quality and use less resources than X264 encode.
Post Reply