Increasing usage of RAM memory

Discussions related to the 1.36.x series of ZoneMinder
mendozaLt
Posts: 20
Joined: Wed Jul 13, 2022 3:05 pm

Re: Increasing usage of RAM memory

Post by mendozaLt »

When are you planning to release the fix to "masses"? I would really like to try it out, since i was unable to get it from proposed ppa...

iconnor wrote: Wed Jul 13, 2022 10:54 pm I found a memleak and have fixed it. Do you want to update to my proposed ppa and test it?

sudo add-apt-repository ppa:iconnor/zoneminder-proposed
sudo apt-get update
sudo apt-get install zoneminder

Should get you a 1.36.21 version although packages are building now and I can't guarantee when they will be available.
mendozaLt
Posts: 20
Joined: Wed Jul 13, 2022 3:05 pm

Re: Increasing usage of RAM memory

Post by mendozaLt »

After 2 updates (v1.36.24), Zoneminder still "eats" memory :(, must restart it to go from f.e. from 82% to 13%...
image_2022-08-12_172518666.png
image_2022-08-12_172518666.png (8.25 KiB) Viewed 3891 times
User avatar
iconnor
Posts: 2862
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Increasing usage of RAM memory

Post by iconnor »

I can't reproduce it. I need a debug level 3 log. Go to options -> Logging -> check debug on, change level to 3. Restart zoneminder. Then send me the contents of /var/log/zm/zmc_m2.log to isaac@zoneminder.com
mendozaLt
Posts: 20
Joined: Wed Jul 13, 2022 3:05 pm

Re: Increasing usage of RAM memory

Post by mendozaLt »

Done.
User avatar
zSprawl
Posts: 17
Joined: Tue Aug 09, 2022 2:53 am

Re: Increasing usage of RAM memory

Post by zSprawl »

I woke up the similar issues this morning. The zoneminder process is up to 12 GB of memory (in a machine with only 12 GB total) and it's swapping 1 GB out of the 4 GB. The machine is operating fine though.

I did have an issue last night where the GUI stopped displaying, but I found the following error in the php-fpm logs:
WARNING: [pool www] server reached pm.max_children setting (50), consider raising it
I edited /etc/php-fpm.conf and increased it to 100, which resolved everything on my side. I don't think it's related to the memory though.
mendozaLt
Posts: 20
Joined: Wed Jul 13, 2022 3:05 pm

Re: Increasing usage of RAM memory

Post by mendozaLt »

Wtf?

image_2022-08-29_210810160.png
image_2022-08-29_210810160.png (7.01 KiB) Viewed 3736 times
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Increasing usage of RAM memory

Post by Magic919 »

You might wish to rotate that.
-
mendozaLt
Posts: 20
Joined: Wed Jul 13, 2022 3:05 pm

Re: Increasing usage of RAM memory

Post by mendozaLt »

mendozaLt wrote: Mon Aug 29, 2022 7:08 pm Wtf?


image_2022-08-29_210810160.png
Ok, probably file system was overfilled by zm logs, deleted log file, disabled debug log, seems to be ok now...
tamahome
Posts: 2
Joined: Thu Jun 24, 2021 9:53 am

Re: Increasing usage of RAM memory

Post by tamahome »

Are there ways to reduce memory consumption?
In early releases 1.36.*, with less memory on the server, everything was ok for me.
I added another 32GB but it didn't get any better,I see oom-kill..
10x 1920x1080 network cam[h264/265] at Mocord mode (1h) ffmpeg/passtrough, ZoneMinder v1.36.26.
Attachments
zmmem.png
zmmem.png (455.7 KiB) Viewed 3555 times
mendozaLt
Posts: 20
Joined: Wed Jul 13, 2022 3:05 pm

Re: Increasing usage of RAM memory

Post by mendozaLt »

Been waiting for a solution for long time :( ... but for now i just had to stop zoneminder, as i cant use it normally...
tamahome
Posts: 2
Joined: Thu Jun 24, 2021 9:53 am

Re: Increasing usage of RAM memory

Post by tamahome »

I think I found a temporary solution for myself, turning off the variable bitrate on the camera helped.
marvinl2010
Posts: 3
Joined: Tue Oct 04, 2022 2:45 pm

Re: Increasing usage of RAM memory

Post by marvinl2010 »

I had this workaround in place for 2 days and it hasn't crashed ever since.
Run command `crontab -e` in my terminal (my linux is rhel 7.9)
Then it will return a vim styled editor.
Insert a line */5 * * * * sync && echo 1 > /proc/sys/vm/drop_caches
Input`:wq` to save and exit it, then every 5 minutes on the minute, the command `sync && echo 1 > /proc/sys/vm/drop_caches` will run, and it will collect the dungling buffer/cache memory spaces, which in my case it fixes the memory leak.
I've tried to review some of the videos it saved, and didn't see any issues.

If I can view the cameras from web browsers as many as I want, I can view the saved videos, and it doesn't crash by exhausting the memory, then I'm happy with it.
mendozaLt
Posts: 20
Joined: Wed Jul 13, 2022 3:05 pm

Re: Increasing usage of RAM memory

Post by mendozaLt »

Can someone guess, when i have restarted zoneminder? :mrgreen:
image_2022-10-07_195310899.png
image_2022-10-07_195310899.png (19.51 KiB) Viewed 3412 times
Lamer
Posts: 1
Joined: Sun Oct 23, 2022 12:42 pm

Re: Increasing usage of RAM memory

Post by Lamer »

mendozaLt wrote: Mon Oct 03, 2022 2:52 pm Been waiting for a solution for long time :( ... but for now i just had to stop zoneminder, as i cant use it normally...
Have you tried to set "Maximum Image Buffer Size (frames)" to some value instead of 0? Actually the meaning and effect of this parameter is not quite clear to me, but setting this to 1000 (for exampe) may solve the problem. Anyway in "Buffers" menu you'll get the definite max "Estimated Ram Use" instead of "Unlimited".
mendozaLt
Posts: 20
Joined: Wed Jul 13, 2022 3:05 pm

Re: Increasing usage of RAM memory

Post by mendozaLt »

Goodmorning

I don't want to say that very loud yet, to not give false hopes... But i think after one of recent updates issue was fixed. It is already a while when I do not observe excessive memory usage... Sometimes it is more, sometimes less, but not all server memory, as it was before...
Post Reply