Where to change ZM memory usage above 50%?

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

Where to change ZM memory usage above 50%?

Post by Tantamount »

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.
3 ReoLink RLC-410
2 Annke NC800
Kubernetes 1.22.6 statefulset of 5 Ubuntu 20.04 pods using iconnor's repository
ZoneMinder Version 1.36.12
User avatar
knight-of-ni
Posts: 2404
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 »

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: 76
Joined: Wed Feb 03, 2016 7:51 am

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

Post by Tantamount »

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.
3 ReoLink RLC-410
2 Annke NC800
Kubernetes 1.22.6 statefulset of 5 Ubuntu 20.04 pods using iconnor's repository
ZoneMinder Version 1.36.12
User avatar
knight-of-ni
Posts: 2404
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 »

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: 76
Joined: Wed Feb 03, 2016 7:51 am

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

Post by Tantamount »

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?
3 ReoLink RLC-410
2 Annke NC800
Kubernetes 1.22.6 statefulset of 5 Ubuntu 20.04 pods using iconnor's repository
ZoneMinder Version 1.36.12
User avatar
knight-of-ni
Posts: 2404
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 »

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: 76
Joined: Wed Feb 03, 2016 7:51 am

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

Post by Tantamount »

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?
3 ReoLink RLC-410
2 Annke NC800
Kubernetes 1.22.6 statefulset of 5 Ubuntu 20.04 pods using iconnor's repository
ZoneMinder Version 1.36.12
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

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

Post by SteveGilvarry »

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.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Locked