Zoneminder after running for a while starts using all bandwidth

Forum for questions and support relating to the 1.29.x releases only.
Locked
Zyb3r
Posts: 4
Joined: Sat May 21, 2016 7:03 am

Zoneminder after running for a while starts using all bandwidth

Post by Zyb3r »

Hi,

I've been testing ZM for the past weeks and have ran in to the following problem.

After running ZM for any number of hours, suddenly it consumes all my bandwidth. I've studied the logs and the only thing I could find is
016-05-21 08:56:10.455699 zms 12995 ERR Unable to send raw frame 8: Broken pipe zm_event.cpp 1329

I don't thing the above is related to the bandwidth problem, but it's the only thing I could find.

Has anyone experienced the same thing? :?:

My setup:
Raspberry pi 2 with Raspbian
ESCAM QD900 connected via WIFI to my router
Raspbian connected via WIFI to my router
Running Zoneminder 1.29 with low bandwidth setting.
petrmaje
Posts: 8
Joined: Fri May 13, 2016 6:54 pm

Re: Zoneminder after running for a while starts using all bandwidth

Post by petrmaje »

Hi,

I'am playing with RPI too. I think wifi is no good for connecting zoneminder server. If you have HD video, you can easily reach 10Mbit/s when watching events. I think, that when you connect your camera to RPI via wifi and for web access to server use wired LAN, you will have really better results.
Zyb3r
Posts: 4
Joined: Sat May 21, 2016 7:03 am

Re: Zoneminder after running for a while starts using all bandwidth

Post by Zyb3r »

Hi petrmaje,

You could be right, and if the resolution were set to HD I would understand it, but my current resolution is set to 640x480 in ZM and 1280x720 (max frame 8 ) in the camera... not exactly something that should use all bandwidth from what I know...

But I'll try add a wired router in between my camera and the RPI.

Problem is that I would like to add cameras in several places outside to monitor all parts of my house, entrance, etc. and I really want to avoid digging down cables all around my plot... wifi is just so much easier. :-)

Also, if the wifi bandwidth are completely exhausted with one camera in low-res without watching events, then that massive load will just be moved to the cables... Not that it matters then, but it could indicate that something is wrong, and then I would much rather solve the problem then trying to create a workaround.

petrmaje: Another thing I have been wondering is how many cameras the RPI can process... How many are you using and in what resolution?

Anyone running via WIFI and have a good suggestion to troubleshooting this?
petrmaje
Posts: 8
Joined: Fri May 13, 2016 6:54 pm

Re: Zoneminder after running for a while starts using all bandwidth

Post by petrmaje »

Hi Zyb3r,

I am using RPI3 and I have very nice results. Two cameras 1280x720 resized to 800x450 and one camera 640x480. All of them 8FPS and mpeg4. This is probably limit, system load is between 2-3,5.
BUT :) I am running BananaPI R1 with disk as SQL server and log server. This is very important, because MySQL is very hungry. Images are stored on fast disk connected directly via USB to RPI3. I had problem also with UDP streams from HD cameras. When I opened "montage view", the picture starts to disintegrate. So I created separate LAN for cameras and used USB-LAN adapter, which si second LAN to RPI. Eeverything is PERFECT now and works better, than zoneminder on "big" PC. Systemload is more stable, because of separate SQL server. :) Next step will be to add second raspberrypi as second ZM server :)))
Zyb3r
Posts: 4
Joined: Sat May 21, 2016 7:03 am

Re: Zoneminder after running for a while starts using all bandwidth

Post by Zyb3r »

Ok, so a separate LAN and a separate SQL server on a USB 3.0 external hard drive. That should help?

Do you know how to identify if the problem I have is the same you are talking about - before I go and add another usb hdd (actually already have one, but waiting for my power cable to arrive)?
petrmaje
Posts: 8
Joined: Fri May 13, 2016 6:54 pm

Re: Zoneminder after running for a while starts using all bandwidth

Post by petrmaje »

If you want one or two cameras, you dont need separate SQL. Move database to disk and everything should be ok. I am 99% sure, that yours problem is the wifi. I dont know, how to confirm that, but try to use cable and you will see. It is not easy to say something general, because everything depends on everything. But after my experiments I can say that raspberrypi is fast enough to run zoneminder nice way.
I finished multiserver configuration just now, RPI2, RPI3, Banana R1, the system is little bit complicated but works pretty fast :)

http://petasek.ddns.net/random/ZM_ARM.png
Zyb3r
Posts: 4
Joined: Sat May 21, 2016 7:03 am

Re: Zoneminder after running for a while starts using all bandwidth

Post by Zyb3r »

Nice - congrats with the set up! :)

I'll move the RPI and Camera to a separate subnet on a shared router connected via cable and see what happens.

I'll update the post once I've tried it out...
Locked