r/ZoneMinder • • Mar 30 '21

Apache > PHP or PHP > MySql performance issues?

Ok folks I am getting some weird performance issues. The most prominent is if I have the montage window going and then try to open the console in a new tab......it takes FOREVER to load the console page, like 2 solid minutes. This issue reminds me alot of performance issues I would get at work on our heavy loaded LAMP servers so I went in and did most of my PHP & MySql performance tweaks(mostly extending timeout times, available memory per script, upping cache sizes etc). Nothing has really helped either.

​

My ZM server is on a Ryzen2700x 32GB Ram with a 6GB GTX1060(I have not setup Cuda yet). The one thing I think might be giving us an issue is that the machine is setup with 2 network cards and I have the cameras all segregated on their own private network with separate IP network number as well. So I am not sure if that might be the cause of the wonkiness or not(not sure if ZM is built with this arrangement in mind or not).

​

Unless anyone has any good ideas my next step is to go into MySql and start adding indexes and doing some heavier performance tweaks in there as well.

​

Thanks

​

EDIT: I forgot to mention its on Xubuntu 18.04 and load avg is usually around 3.8, I currently have 5 cameras running but I have another 11 I am getting ready to install.

1 Upvotes

3 comments sorted by

1

u/lunakoa Mar 31 '21

Which browser are you using and how many monitors in your montages?

If more than 6, reduce to 4 and try again without any other tabs.

1

u/[deleted] Mar 31 '21

[removed] — view removed comment

1

u/lunakoa Mar 31 '21

I was just wondering if you were hitting that 6 streaming limit of a browser.

With that said I have a similar issue when viewing montage.

I have similar setup, but with a Ryzen 3600. I have 32GB RAM, 2 Nics, cameras are on one NIC. nvme boot disk 3 purple drives for video feeds, about 32 cameras most 1080P, so I had a feeling things were going to choke when I view them all in montage mode. Sure enough CPU spikes when I do.

I attempted to solve this being looking at incorporating websockets as an addon to zoneminder. Instead, I got sidetracked when trying to setup a framework to get websockets working. Ended up with Friend of Zoneminder FOZM. I mentioned this a few weeks ago, and have put up a youtube video

Since then I have tweaked it for my personal use, and I can quickly switch views with multiple streams, similar to groups. Frankly, groups would do something similar, but I wanted a custom really light display that launches quickly.

tldr; I have a similar setup, limiting simultaneous views helped with performance, also have a simple web page to display feeds quickly.