Strange limitations of cameras monitoring

Forum for questions and support relating to the 1.30.x releases only.
Locked
bfl
Posts: 6
Joined: Mon Jul 10, 2017 8:42 am
Location: ru_RU, MSK, UTC+3

Strange limitations of cameras monitoring

Post by bfl »

Hi

I need some help to understand what is going on with my ZM. I'm trying to add all campus cameras (over 100) on one ZM installation so everyone can see them over Internet. I have a i7 CPU with 8 GB RAM onboard, Ubuntu server 16.04, ZM 1.30.4, Apache2 and MariaDB. Every camera has max 8 fps of 0.5 Mpx mjpeg channel, used as Ffmpeg source in ZM.

Last week server worked well with 80 cameras in 'monitor' state, but after i tried to add more 15 cameras sometnig gone wrong... I can see only 88 monitors. Seems like ZM ignore new cameras, in console sources of them are red. If i try to reconfigure old monitor with new IP it works well too, so that's not a new camera problem.

Any ideas? LAMP or Ubuntu restrictions? Don't know what else it can be...
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Strange limitations of cameras monitoring

Post by rockedge »

look at your /dev/shm value in the top right hand side of the web console. If you run out of this memory ZM will not display the additional cameras you intend to install or actually crash zoneminder in some cases. You can conserve RAM load by using a very low resolution for each camera too fit more in.

make sure /dev/shm is in order, is my guess to your problem.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Strange limitations of cameras monitoring

Post by bbunge »

8 GIG of RAM may not be enough for all your cameras. Ubuntu will use about half of the RAM for tmpfs. There is a way to allocate more RAM for tmpfs (/dev/shm) but with all those cameras you will run into memory issues with mariadb, specifically innodb_buffer_pool_size. You will also run into database connection issues with a bunch of folks viewing cameras (increase max_connections in my.cnf) I am running 17 cameras @ 320x240 on an i5 quad core with 16GIG RAM and a 1 TB hard drive. Am storing 30 days of video, 4 cameras on mocord the rest on modect. Currently have 82K events stored and my innodb_buffer_pool_size runs about 1 GIG and I have 2 GIG allocated to mariadb.

So, it would be a great idea for you to throw some more RAM in the box and your cameras should magically work! Also, change your PATH_SWAP to /dev/shm once you get more memory.
bfl
Posts: 6
Joined: Mon Jul 10, 2017 8:42 am
Location: ru_RU, MSK, UTC+3

Re: Strange limitations of cameras monitoring

Post by bfl »

You are absolutely right with a note about RAM Load: 4.22 - Disk: 5% - / dev / shm: 100%. Now everything is perfectly clear. Thanks!
User avatar
iconnor
Posts: 2900
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Strange limitations of cameras monitoring

Post by iconnor »

Please note that I find that the default 50 buffers is really more than required. Reducing this in each monitor will drastically reduce your shm use. You might try dropping it to 30 and see if you get any complaints in the logs.
bfl
Posts: 6
Joined: Mon Jul 10, 2017 8:42 am
Location: ru_RU, MSK, UTC+3

Re: Strange limitations of cameras monitoring

Post by bfl »

iconnor wrote: Fri Jul 14, 2017 2:40 pm Please note that I find that the default 50 buffers is really more than required. Reducing this in each monitor will drastically reduce your shm use. You might try dropping it to 30 and see if you get any complaints in the logs.
Wow! Now i can add other cameras without waiting for additional RAM from suppliers! Thank you!
Locked