Load, Disks and Filters

Add any particular hints or tricks you have found to help with your ZoneMinder experience.
Post Reply
numenory
Posts: 9
Joined: Fri May 23, 2008 9:30 am
Location: London

Load, Disks and Filters

Post by numenory »

In my previous post: http://www.zoneminder.com/forums/postin ... topic&f=11 on my experiences with axis cameras and zoneminder I had a couple of issues one was the build up of zms /zms-nph processes this was not the usual apache issue mentioned frequently but turned out to be Firefox 3 (including the new final release).

So Tip 1: Stay clear of Firefox 3 - here's a link to my original thread on it.
http://www.zoneminder.com/forums/viewto ... highlight=

Secondly I had the following issue: 'I did have a background filter running to delete all events over 7 days old, but this was really sending the load through the roof with 'rm' seeming to cause the issue. I have switched off the background filter for now, which unfortunately means i now have to run it manually.'

I have addressed this problem and my filter is back on auto.

The filter is as follows:

Date less than or equal to -8 day
and Disk % greater than or equal to 20
Delete all matches (ticked)

This is saved and set to run in the background.

The disk is 750gb was formatted ext3 and was running 97% full with 3 axis cameras 24/7 @ 4 frames/sec 640x480.

The 'rm' was causing the load to go well above 2.

I decided to test other file systems particularly reiserfs and here is what i did, I took a sata 320gb seagate disk (blank) and connected it to a shiny computer dual core etc etc.

I then formatted it to ext3 and ran the following script:

#!/bin/bash

cd /mnt/f

for d in `seq 1 20`;do
mkdir $d
cd $d
for f in `seq 1 2400`;do
dd if=/dev/zero of=$f bs=1024 count=100 >/dev/null 2>&1
done
cd ..
done

To create 20 directories each with 2400 100kb files in it, this loosely mirrors the directory and file size on my zoneminder install ie my jpgs are about 100kb and i have about 2400 in each directory. I timed the script.

I then rebooted and timed how long to delete with rm this structure.

I reformatted to reiserfs and repeated.

Here are some example results:

Ext3

Time to create: 5 min 25 sec
Time to delete: 7 min 30 sec

Reiserfs

Time to create: 2 min 40 sec
Time to delete: 11 sec (yes 11 sec no minutes)

I ran the experiment several times. With the results in mind i reformatted my 750gb to reiserfs. Zoneminder has now been running for 2 weeks on reiser 24/7 and there has been a marked reduction in load.

Both file systems were mounted with no atime.

Another advantage is a reduction in space usage as i said early, my disk was running at 97% full that has now reduced to 66%

Tip 2: for your data drive is to use reiserfs.
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Post by coke »

That's very interesting to know. I'm glad I chose reiserfs. I noticed a similar improvement when I switched from my original ext3, but I wasn't sure if it was attributed to the addition of a RAID at the same time.

Were you using deep storage setting in ZoneMinder both times?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

reiserfs doesnt suffer the 32k file limit ext3 does... maybe we should look at the old way and bin ext3?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Post by coke »

Does zmaudit use a version of "rm -r"? If so, it should work better with deep storage regardless of the fs.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

Thats as maybe.... but i liked it the old way lol.
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
numenory
Posts: 9
Joined: Fri May 23, 2008 9:30 am
Location: London

Post by numenory »

Just to confirm, Deep storage was not used and is not used on the zoneminder server.

Is there a performance advantage using deep storage?
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

Nice benchmark. I wish you had done more file systems, however. :) File system benchmarks are few and far between.
guzbox
Posts: 1
Joined: Fri Sep 25, 2009 10:55 am

Post by guzbox »

hi to all
is anyone having experience with etx4 fs? and what about the performance comparing to reiserfs?

with zm 1.24.2 ext3 fs and deep storage option enabled I've experincing higher system load than with deep storage disabled
Post Reply