Purge when full a bit aggressive?

Support and queries relating to all previous versions of ZoneMinder
Locked
agoodm
Posts: 52
Joined: Tue Oct 09, 2007 12:16 pm

Purge when full a bit aggressive?

Post by agoodm »

With the latest version of zoneminder came a 'new' feature where by default events you select to delete are only removed from the database and zmaudit is left to clean up the files. This works well when deleting events using the web interface since it keeps the interface snappy and quick.

However I seem to be running into a problem with it in relation to purge when full.

I will try to explain what I think is happening.

The filter is ran and the used amount of space is above 98% therefore it deletes 5 events.

ZMAudit runs and finds that some files on the hard disk are no longer in the database and sets about removing these files. However it doesnt remove them before the neft filter run...

The filter runs again and notes that diskspace is still over 98% used and deletes 5 more events.

This seems to repeat on my 1.22.3 test box, by the time diskspace is cleared back by 1% the filter has removed about 20% of the files on the box.

By the time zmaudit finishes removing all the files my box is only about 85% used. Which basically boils down to a week of footage being removed when it neednt have been.

Any ideas?
User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK

Post by MJN »

You could alter the timings for ZM_FILTER_EXECUTE_INTERVAL and ZM_AUDIT_CHECK_INTERVAL to prevent/minimise the interim period.

Mathew
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

98% is running things a bit tight!

The normal way the PWF filter operates is that as disk usage just nips above the threshold a handful of events are deleted, which is enough to take things back under so it is a continuous process. If you start the filter when you are way over your threshold then yes probably more events than expected will be deleted because of the lag in the file deletions. However you can turn off fast deletes in which case everything is just deleted at the time and not deferred so you would not hit that issue.
Phil
agoodm
Posts: 52
Joined: Tue Oct 09, 2007 12:16 pm

Post by agoodm »

i am not running the filter manually.

in the next 2 days the box will hit 98% again (which is leaving about 2 days worth of space...) and ill see how much it removes.
User avatar
MJN
Posts: 251
Joined: Wed Jan 17, 2007 10:29 am
Location: Wiltshire, UK

Post by MJN »

It is behaving as designed. However, as you've ascertained, the effect of a non-immediate deletion at the filesystem level can result in further deletion requests that may otherwise not be required.

Have you adjusted the timings as suggested? You will likely find the audit interval is geater than the filter execution interval.

Mathew
agoodm
Posts: 52
Joined: Tue Oct 09, 2007 12:16 pm

Post by agoodm »

OK ive edited them, lets see what happens tonight when it goes over 98% I set audit every 600 seconds and filters to run every 900 seconds and it removed over 40% of the recorded files :-O What are the recommended settings?

If its relevant im using deep storage. Secondly its removed all the images from 2 channels and none from the other ones :-S
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

There is a secondary issue with deep storage and aggressive deletes which may be affecting your problem. It should be fixed in 1.23.2 which is just going up now.
Phil
Locked