high ram usage
high ram usage
Help to deal with very high memory consumption.
Initially, at startup, the consumption is normal, but then it grows until it eats up all the free memory. Now there are 20 GB for 6! cameras and there are not enough of them.
This is a virtual machine, the record goes to the network storage. I tried to play with the buffer settings, I tried to include camera passthrough instead of frames.
The details are in the screenshots, consumption is just growing and that's it...
Initially, at startup, the consumption is normal, but then it grows until it eats up all the free memory. Now there are 20 GB for 6! cameras and there are not enough of them.
This is a virtual machine, the record goes to the network storage. I tried to play with the buffer settings, I tried to include camera passthrough instead of frames.
The details are in the screenshots, consumption is just growing and that's it...
Re: high ram usage
A little time has passed and all the RAM has been eaten
Re: high ram usage
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
All available memory has been eaten up again. And this is for 6 cameras!
Re: high ram usage
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.
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
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
please help me figure out what can help - settings or something wrong with zm
Re: high ram usage
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
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
Andy
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
o||||o
Ubuntu 22.04
ZM 1.36.33
E5-1650-v4 Xeon
16 GB RAM
6 cameras -> 54 FPS modect
Re: high ram usage
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
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.
1920x1080x4x101 = 798Mb... but then there are analysis images, raw decoded frame, etc... we quickly get to 1.5Gb per camera.
-
- Posts: 16
- Joined: Mon Oct 10, 2022 3:15 pm
Re: high ram usage
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.
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
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
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
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
Production: zm 1.34.26 - Debian 11 | Test: zm 1.36.33 - Debian 12