Where to change ZM memory usage above 50%?

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
Tantamount
Posts: 71
Joined: Wed Feb 03, 2016 7:51 am

Where to change ZM memory usage above 50%?

Post by Tantamount » Fri Oct 14, 2016 7:22 am

According to the docs:
https://zoneminder.readthedocs.io/en/stable/faq.html

"Also remember by default ZM only uses 50% of your available memory unless you change it."

I'd like to bump this up to 70% or 80%, but I can't find out where to modify this setting.
2 LaView LV-PB932F4
4 ReoLink RLC-411
CentOS 7.4 - 8 Core Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 16 Gigs ram (Running under XenServer as a VM)
ZoneMinder Version : 1.31.1 Release : 1.320.20180206gitga177d8e9.el7.centos

User avatar
knight-of-ni
Posts: 2327
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Where to change ZM memory usage above 50%?

Post by knight-of-ni » Fri Oct 14, 2016 1:50 pm

To get the answer you are looking for, continue reading past the line you quoted from the FAQ.

The instructions tell you exactly how to modify the amount of memory your ramdisk uses, which is what ZoneMinder depends on. Be careful not to set this too high as it will starve your operating system for memory and cause other problems. Sometimes the best thing to do is just add more memory to your system.

UPDATE: Since your signature states you've got 8GB of ram, then you do not have to worry about starving your os for ram.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

Tantamount
Posts: 71
Joined: Wed Feb 03, 2016 7:51 am

Re: Where to change ZM memory usage above 50%?

Post by Tantamount » Fri Oct 14, 2016 4:15 pm

knnniggett,

Are you talking about this line?

"If you want to increase this limit to 70% of your memory, add the following to /etc/fstab tmpfs /run/shm tmpfs defaults,noexec,nosuid,size=70% 0 0"

df -h shows the path is /dev/shm:
tmpfs 3.7G 3.1G 658M 83% /dev/shm

not /run/shm

I thought those instructions was for the old way zoneminder used to deal with shared memory. Do I use /dev/shm in fstab, or /run/shm? I didn't think one could use fstab for /dev folder, and it seemed odd to use /run/shm if I wasn't in fact using that path in operation.
2 LaView LV-PB932F4
4 ReoLink RLC-411
CentOS 7.4 - 8 Core Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 16 Gigs ram (Running under XenServer as a VM)
ZoneMinder Version : 1.31.1 Release : 1.320.20180206gitga177d8e9.el7.centos

User avatar
knight-of-ni
Posts: 2327
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Where to change ZM memory usage above 50%?

Post by knight-of-ni » Fri Oct 14, 2016 4:54 pm

What you are talking about is simply a minor difference between distros.
Debian distros have the symlink /run/shm -> /dev/shm while Redhat distros do not. So use /dev/shm since that is the only one you've got.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

Tantamount
Posts: 71
Joined: Wed Feb 03, 2016 7:51 am

Re: Where to change ZM memory usage above 50%?

Post by Tantamount » Sat Oct 15, 2016 4:57 am

Thank you, that worked.

I attempted to edit the documentation to add some details about that solution to cover other possible distros, but when I clicked on the "Edit on GitHub" link at the top, I got a 404 error:
https://github.com/ZoneMinder/ZoneMinde ... cs/faq.rst

Is submitting pull requests not permitted for the documentation?
2 LaView LV-PB932F4
4 ReoLink RLC-411
CentOS 7.4 - 8 Core Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 16 Gigs ram (Running under XenServer as a VM)
ZoneMinder Version : 1.31.1 Release : 1.320.20180206gitga177d8e9.el7.centos

User avatar
knight-of-ni
Posts: 2327
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Where to change ZM memory usage above 50%?

Post by knight-of-ni » Sat Oct 15, 2016 12:38 pm

Good idea.
I get the same 404 error though. I'm not sure why that button does not work.

Try doing that from our main github site because that is where the files live:
https://github.com/ZoneMinder/ZoneMinde ... aster/docs
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

Tantamount
Posts: 71
Joined: Wed Feb 03, 2016 7:51 am

Re: Where to change ZM memory usage above 50%?

Post by Tantamount » Fri Nov 04, 2016 5:27 am

knnniggett wrote:Good idea.
I get the same 404 error though. I'm not sure why that button does not work.

Try doing that from our main github site because that is where the files live:
https://github.com/ZoneMinder/ZoneMinde ... aster/docs
Knnniggett,

From the README.md file:

"The latest version of these docs can be found at http://zoneminder.readthedocs.org/"

Should that be changed too?
2 LaView LV-PB932F4
4 ReoLink RLC-411
CentOS 7.4 - 8 Core Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz, 16 Gigs ram (Running under XenServer as a VM)
ZoneMinder Version : 1.31.1 Release : 1.320.20180206gitga177d8e9.el7.centos

SteveGilvarry
Posts: 445
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Where to change ZM memory usage above 50%?

Post by SteveGilvarry » Fri Nov 04, 2016 6:54 pm

No that is where they live, there is stable version, which is as of 1.30 release http://zoneminder.readthedocs.io or current master version http://zoneminder.readthedocs.io/en/latest/ Edit on GitHub works in latest version not stable so must be something in how they build that link which is mapped to a commit for stable.
Production Zoneminder 1.35.x
Random Selection of Cameras (Dahua and Hikvision)
More Dev VM's than I care to count.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests