Ext3 and RAID Performance Tuning
Posted: Sat Oct 10, 2009 3:41 pm
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.
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.