Page 1 of 1
high ram usage
Posted: Fri Sep 08, 2023 10:23 am
by leksand
Re: high ram usage
Posted: Fri Sep 08, 2023 2:59 pm
by leksand
A little time has passed and all the RAM has been eaten
Re: high ram usage
Posted: Fri Sep 08, 2023 3:14 pm
by leksand
Re: high ram usage
Posted: Fri Sep 08, 2023 3:27 pm
by leksand
changed the monitor settings in storage to camera passthrough. Memory consumption has decreased, but so far 12 GB for 6 cameras! and perhaps it will grow even more
Re: high ram usage
Posted: Fri Sep 08, 2023 3:48 pm
by leksand
All available memory has been eaten up again. And this is for 6 cameras!
Re: high ram usage
Posted: Sat Sep 09, 2023 10:27 am
by Magic919
You'll need to have a search and formulate a plan.
Here's what I do - I wouldn't run mine on a VM. I have a machine with a decent number of cores and speeds plus 64GB RAM for 4 cams. I tuned the DB and run it on solid state drive. I reduced analysis FPS. I turned off storing JPEGs. I use local storage. I mostly run with ZM's DB logging off (but it might be ok now I'm on NVME). I have a cron job restarting ZM each night.
Re: high ram usage
Posted: Tue Sep 12, 2023 5:47 pm
by leksand
this is too much RAM for nvr and most importantly, there is some kind of incomprehensible increase in memory consumption until all available is eaten up.
please help me figure out what can help - settings or something wrong with zm
Re: high ram usage
Posted: Tue Sep 12, 2023 7:30 pm
by Andyrh
I run 6 cameras all modect on 16GB RAM and only restart every few months of OS patching. See signature.
Post a camera configs, maybe it is something there. Also if you could put the pictures in-line, the previous pictures you posted I can not see for some reason.
My system:
up 46 days, 9:36, 1 user, load average: 3.27, 3.99, 4.24
free -m
total used free shared buff/cache available
Mem: 15897 7690 868 384 7338 7485
Swap: 4095 753 3342
Re: high ram usage
Posted: Thu Sep 14, 2023 10:27 am
by leksand
Andyrh wrote: ↑Tue Sep 12, 2023 7:30 pm
Post a camera configs, maybe it is something there. Also if you could put the pictures in-line, the previous pictures you posted I can not see for some reason
model Hikvision DS-2CD2122FWD-IS
there are 5 such cameras, the settings are identical and 1 analog - there is a stream from the nvr to which it is connected
Re: high ram usage
Posted: Thu Sep 14, 2023 2:44 pm
by iconnor
iframe interval is 50, which is normal for hikvision. So we need to buffer something like 101 frames (depending on pre-event count).
1920x1080x4x101 = 798Mb... but then there are analysis images, raw decoded frame, etc... we quickly get to 1.5Gb per camera.
Re: high ram usage
Posted: Fri Sep 15, 2023 3:38 pm
by jrtaylor71
Have a look at this, it might help. I run 16 camera's all running motion detection and recording.
https://wiki.zoneminder.com/MySQL
This is modifications to the mysql config.
max_connections = 2000
query_cache_type = 0
tmp_table_size = 32M
max_heap_table_size = 32M
performance_schema = ON
innodb_log_file_size = 64M
innodb_file_per_table = ON
innodb_buffer_pool_size = 512M
Re: high ram usage
Posted: Fri Sep 22, 2023 7:50 am
by leksand
iconnor wrote: ↑Thu Sep 14, 2023 2:44 pm
iframe interval is 50, which is normal for hikvision. So we need to buffer something like 101 frames (depending on pre-event count).
1920x1080x4x101 = 798Mb... but then there are analysis images, raw decoded frame, etc... we quickly get to 1.5Gb per camera.
Make the maximum size of the image buffer (frames) equal to 101?
I have 20 GB of RAM allocated for 6 cameras and the regular error oom = memory leak.
changed the maximum size of the image buffer (frames) on 101 - everything is the same: memory consumption grows to an oom error
Re: high ram usage
Posted: Fri Sep 29, 2023 4:33 pm
by fontiano
I had a similar problem when I used a single SSD disk for the database and recordings
I solved the problem by adding a mechanical disk dedicated to event recording and using the SSD disk for the DB
Don't ask me why but the problem is reproducible