gjournal, hardware raid, software raid

Freddie Cash fjwcash at gmail.com
Wed Sep 23 17:34:32 UTC 2009

On Wed, Sep 23, 2009 at 9:03 AM, Oliver Lehmann <oliver at freebsd.org> wrote:

> I'll have soon the following System configuration:
> two 250GB harddisks (WD2500KS)
>  - configured as RAID1 using gmirror
>  - disks are attached to a Promise SATA300 TX2plus
>  - are supposed to hold the whole base system+swap
> four 1TB harddisks (WD10EADS)
>  - configured as RAID5 using a 3ware 3500-4LP with a
>   battery backup unit having write cache enabled.
>  - will hold one big (around 3TB) partition using GPT
> The system itself has 2GB of RAM and is an old dual PIII 850 running on
> an intel L440GX+
> I now plan to setup gjournal for the 3TB partition to slow down the fsck
> run times. The system crashes from time to time so this is vital for me ;)
> I thought about what would be the best configuration here and I saw 3
> solutions:
> 1) have one partition on the 3TB RAID sharing data and journal
> 2) have two partitions, one holding the journal, one holding the data.
>   Both on the 3TB RAID. Preferable the journal at the "beginning" of the
>   disks.
> 3) same partitions like above but the journal partition will be on the
>   gmirror RAID1 holding the base system.
> I like the 3rd option because on a heavy I/O load on the RAID5 the 3ware
> must not switch between data and journal and can stick to handling the
> data only. The Promise controller will then stick to handle the data.
> Looks like some I/O balancing for me...
> I maybe want gjournal for the /usr partition of the RAID1 as well. So I
> would then have two 6GB (2GB*3) journaling partitions on the RAID1 if I
> go for option 3.
> I've never done anything with gjournal, so can't really comment on what
would be the better setup for it.  However, I would like to point out that
there's a fourth option:
  - configure the RAID controller to use 4 Single Disk arrays (or JBOD, not
sure when 3Ware added Single Disk support)
  - use ZFS to create a raidz dataset using the 4 drives

You now have a 3 TB pool of storage, without having to fight with GPT,
without worrying about the "raid5 write hole", without worrying about fsck
at boot, and without trying to figure out how to do journalling.  You'll
still get the benefits of the cache and BBU on the RAID controller, along
with all the alerts from 3dm2, but it will be (in essence) acting as an IDE
controller instead of a RAID controller.

ZFS will handle the RAID, along with a lot of other niceties that come along
with it (journalling/copy-on-write, snapshots, compression, end-to-end data
integrity, etc).

Of course, since this is a 32-bit system with only 2 GB of RAM, you'd need
to do some tuning (via /boot/loader.conf) to make it work well.  But it's a
viable option, IMO/IME (I do something similar using a P4 system with 2 GB
of RAM, at home).

Freddie Cash
fjwcash at gmail.com

More information about the freebsd-performance mailing list