ZM is overloading my HDD

Forum for questions and support relating to the 1.26.x releases only.
Locked
techcom
Posts: 3
Joined: Mon Mar 03, 2014 6:46 am

ZM is overloading my HDD

Post by techcom »

Hi,
i am new to zoneminder and linux also :-) I am just wondering if it is "normal state" for zoneminder to still writes to my HDD even if there is no motion detected. My settings are two IP cameras and modect. Pre-cache buffrer is set to 1 frame (cannot set to 0). Also was trying to enlarge shared memory from 32 to 128 MB (have 2 GB memory installed), but still no effect. Iotop shows process mysqld is still writing data to HDD. Is there any option to set buffers to use memory instead HDD? I am little bit worried about HDD writes 24/7.

Thanks
mikb
Posts: 600
Joined: Mon Mar 25, 2013 12:34 pm

Re: ZM is overloading my HDD

Post by mikb »

techcom wrote:Hi,
i am new to zoneminder and linux also :-) I am just wondering if it is "normal state" for zoneminder to still writes to my HDD even if there is no motion detected. My settings are two IP cameras and modect. Pre-cache buffrer is set to 1 frame (cannot set to 0). Also was trying to enlarge shared memory from 32 to 128 MB (have 2 GB memory installed), but still no effect. Iotop shows process mysqld is still writing data to HDD. Is there any option to set buffers to use memory instead HDD? I am little bit worried about HDD writes 24/7.

Thanks
Not normal -- in large amounts anyway. If there's no motion, and no cameras configured to record constantly, then there's no events to write.

How sure are you that zoneminder's capture/analysis part is writing files to the disk? -- that's the main source of disk writing. Can you see files appearing and/or growing under your events directory?

Could it be ... system swapping, zmaudit running through updating the database purging old logs/events -- that would explain mysqld, other stuff running on the system ... ?
techcom
Posts: 3
Joined: Mon Mar 03, 2014 6:46 am

Re: ZM is overloading my HDD

Post by techcom »

I am using pc only for record motion from cameras, nothing else. HDD is still writing, LED diode still flickering and also can hear that drive is busy. Both cameras are set to "modect" so i am not recording everything, only when motion is detected. If I stop zoneminder, hdd stops too, when start ZM, HDD start writing. Sending printscreen of iotop, inside red rectangle are two processes which are there all the time, other ones not still running "only" about once every 10 sec. In event directory appears only detected motion situations, which is right, if there is no motion, no new files are appearing.
Attachments
ZM.png
ZM.png (33.9 KiB) Viewed 4230 times
sogood007
Posts: 25
Joined: Tue Oct 26, 2004 6:53 pm

Re: ZM is overloading my HDD

Post by sogood007 »

Did you enable high verbosity for debug or there are a lot of warning or error? I have seen case when there is a lot of logging activity (check the log link on the console which you can see) , mysqld will take a lot of CPU time and so as the HDD activity.
mikb
Posts: 600
Joined: Mon Mar 25, 2013 12:34 pm

Re: ZM is overloading my HDD

Post by mikb »

sogood007 wrote:Did you enable high verbosity for debug or there are a lot of warning or error?
Oooo I forgot about debug! Zoneminder does a lot of logging through syslogd (into /var/log/syslog or /var/log/zm/zm/log) and also puts it all in the SQL database. If you have a high level of debug/errors occurring, you will see lots of activity :)

It's chatty enough in normal operation, never mind more verbose levels.
techcom
Posts: 3
Joined: Mon Mar 03, 2014 6:46 am

Re: ZM is overloading my HDD

Post by techcom »

I just set LOG_LEVEL_SYSLOG and LOG_LEVEL_DATABASE to none and now it is all perfect. CPU usage drops to 20% from 85-90% and disk is no more writing like crazy :-) I never played with settings on Logging tab, all settings was default so i didnt expected it could be something wrong there. Thanks for your help, hope my HDD will survive this without much damage :-) It is old drive, but still working.
Locked