ZoneMinder taking a lot of Ram

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
didierboudboul
Posts: 1
Joined: Sun Feb 23, 2025 7:53 pm

ZoneMinder taking a lot of Ram

Post 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
bbunge
Posts: 2975
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: ZoneMinder taking a lot of Ram

Post 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.
Post Reply