zmaudit.pl make a very high i/o wait ...

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
interdif
Posts: 6
Joined: Mon Mar 09, 2020 1:09 pm

zmaudit.pl make a very high i/o wait ...

Post by interdif »

HI,

i'm new to this forum, i run zoneminder since 6 months +/-

i have a big setup ... total 16 cameras, 5 at 25 fps and others at 15-20, i know its high fps but its really needed in this case of usage

it run on a 2x6core (5600 serie) with 24gb ddr3 ecc reg, system is on a raid 1 of 2 ssd, mysql run there, the video storage is only on 1 6Tb hdd ( i want a raid 5 or10 later )

when the filter is executed i get a high i/o wait, iotop say its : rm -rf /home/disk-1/zm/....

since rm -rf isnt the fastest method in linux for deleting a lot of files i wanted to try other command, i dont find this rm-rf in zmfilter.pl, i have found 2 rf -rf in zmaudit.pl but not the right one, i'm not familiar with perl also ...

if someone could tell me what line and where is this rm -rf commande to try something else it would be awesome !

i would also probably need 2-3 advice but i need to find a way with this issue first.

thx for taking time to read this ;)
User avatar
Bluemax
Posts: 121
Joined: Wed Jun 12, 2019 5:15 pm

Re: zmaudit.pl make a very high i/o wait ...

Post by Bluemax »

interdif wrote: Mon Mar 09, 2020 1:23 pm since rm -rf isnt the fastest method in linux for deleting a lot of files
Which method do you think is faster?
Last edited by Bluemax on Mon Mar 09, 2020 8:06 pm, edited 2 times in total.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: zmaudit.pl make a very high i/o wait ...

Post by rockedge »

I will look at it and see what there is and report back
User avatar
Bluemax
Posts: 121
Joined: Wed Jun 12, 2019 5:15 pm

Re: zmaudit.pl make a very high i/o wait ...

Post by Bluemax »

It's probably here. Please don't forget my question above.

Instead of a striped raid i'd better go for separate drives and spread the i/o streams accordingly.
interdif
Posts: 6
Joined: Mon Mar 09, 2020 1:09 pm

Re: zmaudit.pl make a very high i/o wait ...

Post by interdif »

HI, thx for the reply, i had very good result with :

mkdir /rsync-zm-empty

rsync -a --delete /rsync-zm-empty/ /path-to-your-zm-event-dir/

i know there is a way with perl but like i said perl isnt my stuff ... i will ask a friend who handle millions of img to delete per day, i know he does that with perl
interdif
Posts: 6
Joined: Mon Mar 09, 2020 1:09 pm

Re: zmaudit.pl make a very high i/o wait ...

Post by interdif »

I forgot something important in my first port, i need to have 2 camera with "save jpeg's" enabled because i cant wait the event end to watch the record, its sometimes needed to watch the record less than 1 min after the incident ...

so i have many mp4 and tons of jpegs, at least for 2 camera, but later 3-4 total with jpeg enabled

again i know its not so efficient but so far i didnt find any other solution that i could use instead of this one and i like zoneminder ;)


P.S sorry if the english isnt so good, i'm French and i dont pratice a lot since some years ..
interdif
Posts: 6
Joined: Mon Mar 09, 2020 1:09 pm

Re: zmaudit.pl make a very high i/o wait ...

Post by interdif »

this was the right line, i did this change :

my $command = "/bin/rsync -a --delete /rsync-zm-empty/ $storage_path/$event_path && /bin/rm -rf $storage_path/$event_path";


for sure it could be more pretty but its only as test, the load droped a lot, i will monitor this for some hours, i let you know ;)
mikb
Posts: 585
Joined: Mon Mar 25, 2013 12:34 pm

Re: zmaudit.pl make a very high i/o wait ...

Post by mikb »

interdif wrote: Tue Mar 10, 2020 3:11 am

Code: Select all

my $command = "/bin/rsync -a --delete /rsync-zm-empty/ $storage_path/$event_path && /bin/rm -rf $storage_path/$event_path";
"May your variables always be assigned" ...

Code: Select all

my $command = "/bin/rsync -a --delete /rsync-zm-empty/ / && /bin/rm -rf /";
You never want to see that happen ...
interdif
Posts: 6
Joined: Mon Mar 09, 2020 1:09 pm

Re: zmaudit.pl make a very high i/o wait ...

Post by interdif »

hi,

on the original code its : /bin/rm -rf $storage_path/$event_path ...

anyway the command is run under user apache not root

i have divided by 3+ my I/O wait for now
Post Reply