Page 1 of 1

ZoneMinder taking a lot of Ram

Posted: Sun Feb 23, 2025 7:58 pm
by didierboudboul
Hello,

I just bought a Pi5 8GB and some cameras to test ZoneMinder, it worked fine for 30minutes, and after a restart,
I see in my htop
/usr/bin/perl -wT /usr/bin/zmwatch.pl
taking all of my memory (8GB) and also 100% memory, and it freeze my raspberry for 5minutes each check of the zmwatch.pl, is there a misconfiguration ?

Thanks
Have a good day :D

Re: ZoneMinder taking a lot of Ram

Posted: Mon Feb 24, 2025 9:22 pm
by bbunge
How many cameras and what resolution?
Are you using MODECT and not record?
You may want to increase the size of the swapfile. RPIOS uses a 512M swapfile by default. To do this:
sudo dphys-swapfile swapoff
sudo nano /etc/dphys-swapfile and change the "512" to 2048 or greater. Might be a good idea to do an 8 GB swapfile.
sudo dphys-swapfile setup
sudo dphys-swapfile swapon

Check the swap with the free command

Might also be a good idea to use Mariadb instead of MySQL. See the ZM WIKI for install procedures.