Hello,
I'm freshly new to ZoneMinder and although I like what the program has to offer i'm at my wit's end trying to find out why it is slowly chewing all my RAM.
I've spent days restarting this service and tweaking it to try to get it to function properly
Zoneminder is running in a Ubuntu VM hosted on proxmox. I have dedicated 32Gb of RAM to this VM but eventually it will chew up all the RAM.
https://imgur.com/kPUhQJH
I have 1 camera with 2 streams setup.
1 SD stream(640x480), Mocord, Analysis images only. I've set a max image buffer size of 1000(881Mb)
2 HD stream (2560-1920), Record, Image, Save JPEG disabled, Linked t my SD stream. Max image buffer size 100(2.75Gb).
My logs show no errors and I am backing up the videos to a mechanical HDD drive and not the SSD the zoneminder is running on.
I'm sorry if i'm missing any information I am completely new to ZoneMinder.
Thank you for any help
Memory Leak v1.36.35
Re: Memory Leak v1.36.35
Those are pretty huge max image buffer settings.
There might be a leak, I was tracing one the other day, never found it, but it was so tiny that it would take weeks to show up.
If anything is slow, db, disk, cpu whatever then the queues will fill up taking all ram until you hit maxImagebufferCount. But there should be lots of warnings in the logs if that is happening.
There might be a leak, I was tracing one the other day, never found it, but it was so tiny that it would take weeks to show up.
If anything is slow, db, disk, cpu whatever then the queues will fill up taking all ram until you hit maxImagebufferCount. But there should be lots of warnings in the logs if that is happening.
Re: Memory Leak v1.36.35
Memory usage from Proxmox will only be a small part of the story, and not the useful part.
If you look at the VM and run free it will give you better detail. You may find something similar to my system with 6 hi-res and 6 low-res cameras.
In Proxmox mine would show nearly all of the 16GB used, but from the OS you can see of the 16GB, 11GB is available.
There could be something going on, but you will need to report from the guest, not the host to track it.
If you look at the VM and run free it will give you better detail. You may find something similar to my system with 6 hi-res and 6 low-res cameras.
Code: Select all
free -m
total used free shared buff/cache available
Mem: 15897 3381 371 387 12144 11790
Swap: 4095 1078 3017
There could be something going on, but you will need to report from the guest, not the host to track it.
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: Memory Leak v1.36.35
Thank you for your replies.
Here is a screenshot of my memory usage from both proxmox and from the terminal.
i'm sorry as I am a newb i'm not super familiar with embedding images.
https://imgur.com/jil2beM
https://imgur.com/SjO5RQO
I noticed from free -m through the terminal the buff/cache file seems to be what is constantly growing and not the physical RAM.
Being cache i guess it's nothing to really worry about. Still not sure why ZoneMinder would need such a large cache file though.
The following is taken from AI
"The relationship between buff/cache and total RAM is that the buff/cache memory is a subset of the total RAM. In other words, the buff/cache memory is a portion of the total RAM that is being used for caching and buffering purposes.
It’s worth noting that the buff/cache memory is not necessarily “used” memory in the classical sense. While it is allocated for caching and buffering, it can be quickly freed up if applications require more memory. This is why the available column in the free command output is often more relevant than the free column, as it takes into account the buff/cache memory that can be freed up if needed."
Here is a screenshot of my memory usage from both proxmox and from the terminal.
i'm sorry as I am a newb i'm not super familiar with embedding images.
https://imgur.com/jil2beM
https://imgur.com/SjO5RQO
I noticed from free -m through the terminal the buff/cache file seems to be what is constantly growing and not the physical RAM.
Being cache i guess it's nothing to really worry about. Still not sure why ZoneMinder would need such a large cache file though.
The following is taken from AI
"The relationship between buff/cache and total RAM is that the buff/cache memory is a subset of the total RAM. In other words, the buff/cache memory is a portion of the total RAM that is being used for caching and buffering purposes.
It’s worth noting that the buff/cache memory is not necessarily “used” memory in the classical sense. While it is allocated for caching and buffering, it can be quickly freed up if applications require more memory. This is why the available column in the free command output is often more relevant than the free column, as it takes into account the buff/cache memory that can be freed up if needed."
Re: Memory Leak v1.36.35
It is a Linux thing; unused RAM is wasted RAM. Linux is more or less caching all writes. If you gave it a TB of RAM it would eventually use most of it for cache.
If the host needs more RAM, you can experiment with reducing the RAM on the ZM VM. Mine is happy with 16GB.
If the host needs more RAM, you can experiment with reducing the RAM on the ZM VM. Mine is happy with 16GB.
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