Page 1 of 1

Ext3 and RAID Performance Tuning

Posted: Sat Oct 10, 2009 3:41 pm
by knight-of-ni
EXT3 Tuning

In my quest to make my system run as efficient as can be, I learned the following options can be added to your fstab for any ext3 filesystem:

noatime
commit=120
data=writeback

So if you dedicate an entire disk to your Zoneminder events then your fstab entry may look something like this:

/dev/{your disk} /var/www/html/zm/events ext3 defaults,noatime,commit=120,data=writeback 0 2

I recommend you google these parameters and learn what they do before you set them. In particular if you are running Ubuntu, you should read the following and pay attention to the extra steps one may have to take in order to get "data=writeback" to work on your root filesystem:

http://ubuntuforums.org/showthread.php?t=107856

RAID Tuning

If your Ext3 filesytem is on a raid volume then you can tweak your system further by changing the "stride" and "stripe-width" parameters.

You'll need to know some things about your raid volume like raid level, number of disks, raid chunk size, and filesystem block size, but they are not hard to find. The BIOS in your raid controller will tell you these things if you do not know how to get your operating system to tell you this.

Check out this handy calculator that will determine the stride and stripe-width for you: http://busybox.net/~aldot/mkfs_stride.html

If your filesystem already exists, simply use tune2fs, instead of mkfs, in the following mannor:

tune2fs -E stride={xx},stripe-width={xx}

I doubt you can safely do this on a mounted volume so boot from a live cd if you cannot first unmount the volume in question.

Posted: Mon Nov 30, 2009 9:14 pm
by archangel689
I'm confused as to why you're using ext3 at all . If I'm dealing with large files, especially video I'd look into XFS since that is specifically what it was made for. JFS is also an option.

Posted: Mon Nov 30, 2009 11:27 pm
by knight-of-ni
Out of the box, zoneminder doesn't create large files. It creates a lot of small jpeg's, but I agree with your point that perhaps a different file-system would be something to consider.

I've used reiserfs on a past system, but I never tested to see if that system benefited from it. The system I'm running now (CentOS) doesn't have reiserfs support in the standard kernel, and due to suboptimal results with the CentOS Plus kernel, I have chosen to stick with the ext3 file-system for the time being as my attention is currently diverted elsewhere.

If you can make a convincing argument for a particular file-system, I would be willing to consider it.