What is using up my memory?

Discussions related to the 1.36.x series of ZoneMinder
Post Reply
RonRN18
Posts: 52
Joined: Tue Aug 13, 2019 1:00 am

What is using up my memory?

Post by RonRN18 »

I've had ZoneMinder running for nearly two years now and haven't had too many issues with it... until recently. I am not checking on it all the time but I do go through and update my system from time to time. I am currently running v1.36.12 on an Ubuntu VM. I gave the main operating system portion of ZoneMinder 80 GB of drive, and then I have created a couple additional drives that are mounted in the "/media/" folder, where all the video recordings are made. I am not sure why, but all of a sudden, as in the past week or so, my main system has exploded in size. I am having difficulty see what is actually taking p the space, but I quickly went from 16 GB used to 75 GB used in about one week's time!!! I am bewildered as to what is taking up all of the space and what can be done to minimize all of this. As I had no video content that I really cared to archive, I cleared my databases of all of the video files and so both of the drives that are used to store videos are essentially empty, other than those that have recorded in a short period of time. as I'm trying to figure out WHERE the excess data is, I see that in /var/lib/mysql/zm, there is 48 GB in use... that partially explains what is taking up so much space but WHY would the database be storing so much crap? How can I declutter the database? Another 21GB is in /var/log, with /var/log/zm using up 8.2 GB of space, /var/log/journal taking up another 4.0 GB.
reelbusy
Posts: 5
Joined: Wed Jan 26, 2022 4:37 am

Re: What is using up my memory?

Post by reelbusy »

assuming no large files lots of binlogs ,etc which isn't typically needing to be enabled here, i'd guess lots of free space within data files from the big purge.... deletes don't return space back to the OS just within the files

check for SELECT table_schema, table_name, data_free / 1024 / 1024 as mb_free FROM information_schema.tables WHERE engine LIKE 'InnoDB' AND data_free > 5000*1024*1024;

lookup optimize table to free that back to the os if huge mb_free, that's free space within data files which can be free'd back to the os...or just run optimize on everything for heck of it.

on the /var/log/zm i'm going to assume your log level settings, are info or something. tough to tell these sorts of things without knowing *which* files are big.
Post Reply