Page 1 of 3
Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 3:15 pm
by mendozaLt
Zoneminder slowly eats my server memory... I have to restart it at least once a day to get back to sane memory usage. Is there anything i can do to stop it stealing RAM? If i would not restart it it would probably go to the point where server starts choke, lag and restart...
When i restart it:
- image_2022-07-13_171214072.png (8.42 KiB) Viewed 6871 times
After few hours:
- image_2022-07-13_170951718.png (7.52 KiB) Viewed 6871 times
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 3:45 pm
by Andyrh
Is it actually causing a problem? You say it might cause a problem. My 16GB system is currently running with 851MB free. It has been up 17 days.
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 3:52 pm
by cookiemonster
Hi. It's well worth checking the FAQs if you haven't tried already
https://zoneminder.readthedocs.io/en/stable/faq.html
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 3:55 pm
by mendozaLt
It's currently 56 Gb (to be upgraded), and its not only to zm, there is a lot other guys, that would like to get some ram... And it only three cameras...
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 4:00 pm
by Andyrh
On my 6 camera system there is not much 'free' RAM, but there is plenty of available RAM.
@watcher:~$ free -m
total used free shared buff/cache available
Mem: 15912 10015 982 468 4914 5091
Swap: 4095 1995 2100
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 4:09 pm
by mendozaLt
Andyrh wrote: ↑Wed Jul 13, 2022 4:00 pm
On my 6 camera system there is not much 'free' RAM, but there is plenty of available RAM.
@watcher:~$ free -m
total used free shared buff/cache available
Mem: 15912 10015 982 468 4914 5091
Swap: 4095 1995 2100
When i restart zm, i also have plenty of available, but few hours later zm occupies most of it...
Approx an hour ago, when i posted this question, it was:
- image_2022-07-13_171214072.png (8.42 KiB) Viewed 6864 times
Now:
- image_2022-07-13_180834940.png (7.77 KiB) Viewed 6864 times
Numbers are not scary YET, but with this speed, tomorrow morning i will have redline on my webmin memory gauge...
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 4:35 pm
by Andyrh
I should have mentioned that is after 17 days.
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 4:45 pm
by Magic919
It’s what it does. Hopefully it’ll be fixed one day.
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 5:55 pm
by iconnor
We need to narrow down what your monitors are doing. I have had other reports of this but no amount of valgrind has shed any light.
So what are they doing? ffmpeg type? modect, mocord, etc? camera passthrough or encoding? jpegs? Is there a large number of events during the time when the ram increases?
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 6:21 pm
by mendozaLt
Two monitors Modect, one Monitor (does not record).
I haven't changed anything much far from default...
- image_2022-07-13_201220067.png (36.55 KiB) Viewed 6846 times
- image_2022-07-13_201317292.png (26.12 KiB) Viewed 6846 times
- image_2022-07-13_201409169.png (20.74 KiB) Viewed 6846 times
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 6:25 pm
by mendozaLt
Not so much events... 45 - 50 per hour, and they are short...
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 6:28 pm
by iconnor
Okay you are writing jpegs... I had a case yesterday where a machine was not keeping up due to writing jpegs.
Are there warnings in your logs? Is the timestamp keeping up?
I'll set one of my cams to jpegs and see if I can reproduce it.
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 6:43 pm
by mendozaLt
iconnor wrote: ↑Wed Jul 13, 2022 6:28 pm
Okay you are writing jpegs... I had a case yesterday where a machine was not keeping up due to writing jpegs.
Are there warnings in your logs? Is the timestamp keeping up?
I'll set one of my cams to jpegs and see if I can reproduce it.
Which exactly log file should i check? But anyway, there is nothing much wrong in the logs... Just some of these:
Code: Select all
07/13/22 21:05:21.692011 zms_m4[1854890].WAR-zm_monitorstream.cpp/425 [Frame send time 7785 msec too slow, throttling maxfps to 20.00]
07/13/22 21:07:33.929069 zms_m4[1857833].WAR-zm_monitorstream.cpp/412 [Unable to send stream frame: Broken pipe]
07/13/22 21:08:23.843189 zms_m4[1858259].WAR-zm_monitorstream.cpp/412 [Unable to send stream frame: Broken pipe]
Re: Increasing usage of RAM memory
Posted: Wed Jul 13, 2022 10:54 pm
by iconnor
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.
Re: Increasing usage of RAM memory
Posted: Thu Jul 14, 2022 4:45 am
by mendozaLt
I would, i tried...
Code: Select all
E: The repository 'http://ppa.launchpad.net/iconnor/zoneminder-proposed/ubuntu k inetic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disa bled by default.
N: See apt-secure(8) manpage for repository creation and user configuration deta ils.
root@server:~# apt-get install zoneminder
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
zoneminder is already the newest version (1.36.20-bullseye1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.