Page 1 of 1

Load, Disks and Filters

Posted: Wed Jun 18, 2008 9:33 am
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.

Posted: Wed Jun 18, 2008 3:15 pm
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?

Posted: Wed Jun 18, 2008 4:13 pm
by jameswilson
reiserfs doesnt suffer the 32k file limit ext3 does... maybe we should look at the old way and bin ext3?

Posted: Wed Jun 18, 2008 6:40 pm
by coke
Does zmaudit use a version of "rm -r"? If so, it should work better with deep storage regardless of the fs.

Posted: Wed Jun 18, 2008 10:36 pm
by jameswilson
Thats as maybe.... but i liked it the old way lol.

Posted: Thu Jun 19, 2008 9:11 am
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?

Posted: Sun Jun 22, 2008 3:49 am
by Lee Sharp
Nice benchmark. I wish you had done more file systems, however. :) File system benchmarks are few and far between.

Posted: Fri Sep 25, 2009 11:02 am
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