[SOLVED] Monitoring high resolution/high fps feed

Forum for questions and support relating to the 1.30.x releases only.
Uschiekid
Posts: 3
Joined: Fri Feb 17, 2017 2:27 am

[SOLVED] Monitoring high resolution/high fps feed

Postby Uschiekid » Fri Feb 17, 2017 3:13 am

I am using Ubuntu 14.04LTS, with ZoneMinder 1.30.2.

I used the easy install method (then upgraded using ppa Zoneminder-master, as only 1.26.5 was available on stable, for 14.04) EDIT: I realise now that 1.30.0 was only temporarily not available for 14.04 when I was trying to get a current version, with only the software center version available at the time. When I check the stable ppa now, trusty is there with 1.30.0. I have stopped subscribing to the zoneminder-master ppa, so will just get upgrades from the stable ppa from now. However, this problem existed with my previous install that was a recent version, possibly 1.30.0, or the previous version to that on the stable ppa. The reinstall had to do with an ubuntu issue, where I had to reinstall many things, not specifically to do with the issue listed below. END OF EDIT.

I have got various cameras and setups to work without issue, but I am not an expert, so I can't get rid of this one issue.

My intended use is to VIEW ONLY, with no motion detection or recording needed (I will do that through other means).
My understanding is that this should be done with the "Monitor" function. I don't need the pause and rewind functions, I just want to view the feed live. I want to have the monitor window open during waking hours. This works, with one caveat.

This concerns my main camera, a foscam R2 (V3) (running as a remote rtsp/unicast (EDIT: same results with remote rtp/rtsp and Ffmpeg rtp/rtsp, btw)--other values in monitor setup as default), which I want to use high resolution for my viewing (sometimes 720p and sometimes 1080p), and I believe my computer can handle high fps, since it works with both VLC and Xeoma. The camera's Mainstream is set at 1080p/25fps and the Substream is 720p/11fps. When I initiate a viewing window, all runs smoothly.

Then (based on logging of the capture) after 2000 captured frames or so, the problem starts.

I have a constant system monitor on my gnome panel, and I see that moderate activity is being written to disk. Then after 3000 captured frames, this becomes worse and so on. It ends up having 60% or more of the disk in use, for minutes at a time. Which is obviously not a good thing. And of course using the disk constantly ends up causing the computer to heat up over time.

I believe this is because there is not enough memory being used, and so it is writing to disk instead. But I have 16GB memory, as well as the same in SWAP, even when most is not used, this still occurs. I've hunted for a solution, and the closest thing that I've stumbled upon that might affect this is the setting FRAME_SOCKET_SIZE, but I can't find any example values for when the default 0 doesn't work. It suggests:
"You can use
this option to indicate that a larger buffer size should be used. Note
that you may have to change the existing maximum socket buffer size on
your system via sysctl (or in /proc/sys/net/core/wmem_max) to allow
this new size to be set"

But I really don't know enough about this to mess around with the system settings without advice, even though I tried to read up on it. So I don't want to experiment, unless I know that this definitely is the issue, or at least what values might be good to try.

The camera itself works, when this problem shows up, Zoneminder doesn't produce any errors, just states something like "2017-02-16 20:55:34.020023 zmc_m13 12095 INF HumLANSub: 6000 - Capturing at 11.36 fps zm_monitor.cpp 3125" every few minutes.
Looking through my log shows lots of errors, but they are from when I was trying to fix this by changing settings, and then changing back. If I restart my zoneminder, and then just view a camera, I don't think it has any errors to show something is going wrong. If someone wants me to perform certain actions, and then post the log, I can do that.

If the above setting is relevant, my cat /proc/sys/net/core/wmem_max is 212992

If any one can give me any advice, suggestions or help, I would really appreciate it. I want to get this camera viewing smoothly before the return period is up. I'm not a linux expert, but I do use Ubuntu pretty much exclusively.

Thanks in advance

Edit: There are some warnings and errors when starting up the monitor, but while viewing, there are only the logs listed above. However I'm attaching a log showing the errors and warnings as well. This is with the R2 camera @720p/11fps and a low fps/620x480 res android phone turned ip cam (both in a dark room, so no activity) . Each with a window open, in monitoring state.
zm log viewing.txt
(5.24 KiB) Downloaded 5 times
Last edited by Uschiekid on Fri Feb 17, 2017 5:59 pm, edited 1 time in total.

Uschiekid
Posts: 3
Joined: Fri Feb 17, 2017 2:27 am

Re: Monitoring high resolution/high fps feed

Postby Uschiekid » Fri Feb 17, 2017 3:50 pm

Possible solution?

I am not very knowledgeable about this AT ALL, so excuse any dumb/noob-nesses :-)

My /tmp is not tmpfs, from what I can tell. I wonder if this is why I am seeing so much disk activity. This article describes changing /tmp to tmpfs
https://insights.ubuntu.com/2016/01/20/data-driven-analysis-tmp-on-tmpfs/

using:

Code: Select all

$ echo "tmpfs /tmp tmpfs rw,nosuid,nodev" | sudo tee -a /etc/fstab
$ sudo reboot


I know this isn't specifically Zoneminder, but could this stop my Monitor viewing writing to disk?

On a side note, I have tried using low res/low fps (640x360 and 10fps) and high res/low fps (1080p and 5fps), this problem still exists, although the higher res and fps means it starts almost immediately.

EDIT: I did also try the temporary change in swappiness listed on this ZM wiki:
https://wiki.zoneminder.com/Common_Issues_with_Zoneminder_Installation_on_Ubuntu

It didn't seem to have an effect, which didn't surprise me as my SWAP isn't being used anyway.

Here's an image of my system monitor, just at the start of the problem...at that point, the monitor had been open for a few minutes. Disk in orange, the empty one is swap, green is memory.
Attachments
zoneminder issue.png
zoneminder issue.png (3.85 KiB) Viewed 98 times

Uschiekid
Posts: 3
Joined: Fri Feb 17, 2017 2:27 am

SOLUTION: Monitoring high resolution/high fps feed

Postby Uschiekid » Fri Feb 17, 2017 5:58 pm

The method listed above changing /tmp to tmpfs seems to have worked! No more writing to disk. The cpu usage goes up, but I think I can live with that.


Return to “ZoneMinder 1.30.x”

Who is online

Users browsing this forum: No registered users and 3 guests