xfs
[Top] [All Lists]

XFS, RAID-5, 3ware

To: linux-xfs@xxxxxxxxxxx
Subject: XFS, RAID-5, 3ware
From: Gaspar Bakos <gbakos@xxxxxxxxxxxxxxx>
Date: Thu, 19 May 2005 18:06:25 -0400 (EDT)
Reply-to: gbakos@xxxxxxxxxxxxxxx
Sender: linux-xfs-bounce@xxxxxxxxxxx
Hi,

This is an old topic, with some earlier correspondence, but details are
still not clear.

I have a 3ware hardware RAID-5 array of 8 300Gb disks. The stripe size
is 256k. By the way, 3ware recommends small stripe size for sequental
access (video). and large strip for random access (DB, random files,
etc.) I wonder if there is any experience related to this statement.

I am trying to collect the considerations when creating a good
performance, stable XFS filesystem on this ~2TB partition. (System:
FC3, kernel: 2.6.11smp on dual opteron, mkfs.xfs version 2.6.13). These
considerations depend on the purpose of the partition; I am trying to
set up big databases, and also smaller files of ~100Kb, but not
anything like few Kb.

What I would use is:

mkfs.xfs -f -b size=4k -d su=256k,sw=7 -i size=1k -l size=128m,su=256k \
        /dev/sdc1 -L "big"

Questions:
1. -b
   size: how to determine the optimal size?
   Currently I am using the default, which is 4K.

   This has an effect primarily on the disk-access? Larger block-size,
   faster access I guess. On the other hand, less efficient use of space?

   http://www.newsforge.com/article.pl?sid=03/10/07/1943256:
   " with XFS, the block size can theoretically be any power-of-two
   multiple of 512 bytes up to 64KB (65536 bytes), although in practice
   you can only mount a filesystem with block sizes up to 4KB or 8KB
   using common CPUs"
   Is this true?

2. -d
   su: the strip size of the RAID-5
   sw: n-1, where n is the number of disks
   agcount: my understanding is that this is quite well optimized in an
     automated way, thus I use the default.

3. -i
   size: how to determine the optimal size?
   many small files; use large inode size? few large files: use small inode?

   What I read somewhere:

    ...
    can't exceed half the allocation block size, though.) One impact of
    the inode size option relates to small file access times; because
    XFS tries to store small files within the inode whenever possible,
    specifying a large inode enables storing larger files within the
    inode. Doing so will speed access to these files. Therefore, if a
    partition will store many small files (under 2KB), you may want to
    increase the inode size. Depending on the exact mix of file sizes,
    the result may save or waste disk space. If few files will be
    smaller than 2KB, there's little point to increasing the inode
    size.
    ...

4. -l
   size:
     The default value for my setup turns out to be
           log      =internal log           bsize=4096   blocks=32768, version=1
                    =                       sectsz=512   sunit=0 blks
     This corresponds to size=128m

    su: should be set to the stripe size of the RAID-5 array for
    optimal performance?

---------------------------
Let me know if there are any comments, and I you see that we are doing
something crazy:

root$ mkfs.xfs -f -b size=4k -d su=256k,sw=7 -i size=1k -l size=128m,su=256k \
        /dev/sdc1 -L "big"

log stripe unit specified, using v2 logs
meta-data=/dev/sdc1              isize=1024   agcount=32, agsize=16021184 blks
         =                       sectsz=512
data     =                       bsize=4096   blocks=512676288, imaxpct=25
         =                       sunit=64     swidth=448 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=32768, version=2
         =                       sectsz=512   sunit=64 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0
-------------------

Cheers,
Gaspar


<Prev in Thread] Current Thread [Next in Thread>