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