Chapter 7. Enhanced XFS Extensions

This chapter discusses the following enhanced XFS extensions:

agskip Mount Option for Allocation Group Specification

The agskip mount option specifies the allocation group (AG) for a new file, relative to the last previously created file (that is, it has the opposite effect of the rotorstep system tunable parameter). Using agskip=agskipvalue causes each new file to be placed in the AG initialAG+agskipvalue , where initialAG is the allocation group used for the previously created new file.

For example, agskip=3 means each new file thereafter will be allocated three AGs away from the AG used for the most recently created file.

The agskip mount option disables the rotorstep system tunable parameter.

ibound Mount Option for Solid-State Drives

The ibound mkfs.xfs mount option supports use of a solid-state drive (SSD) in combination with rotating disk storage. SSD is appropriate for small latency-sensitive operations, while rotating hard-disk drive (HDD) media is appropriate for larger bandwidth- and capacity-intensive operations.

You should create an XVM volume for the storage that concatenates a slice of SSD storage with HDD storage. The SSD storage is positioned at the beginning of the volume, followed by the HDD storage. You can configure the HDD storage as a simple slice or as a stripe of slices.

The configuration of the HDD concat depends on the data I/O workload. You should construct the volume containing the SSD so that the SSD is the first concat element in the volume. With the SSD at the beginning of the volume, you can use the ibound mount option to specify that all inodes are placed on the SSD device.

If the ibound address falls within the middle of an XFS filesystem allocation group (AG), that AG is not used for inode allocation. Only the lower-numbered AGs are used for inode allocation. Should the ibound address fall within the first AG (AG 0), the value of ibound is changed to include the entire first AG.


Note: The ibound mount option implies inode32 behavior and is therefore incompatible with the inode64 mount option. Behavior of the inode32 mount option is not affected.

To maximize performance of the filesystem with an SSD drive, you should use an external log. You can use a partition of the SSD or a separate HDD.

ibound Examples

The ibound mount option uses the following format, where daddr is the largest disk address (sector) allowed to be used for storing an inode:

# mount -o ibound={daddr} device dir

You should also use the daddr value for the allocation group (AG) size (agize) when creating the filesystem. The AG should be no larger than the SSD slice.

For example, the following shows that the SSD element is slice/ssd0s1, with 195093024 sectors:

xvm:local> show -e -top vol
vol/hybridfs                     0 online,accessible
   subvol/hybridfs/data    11916164384 online,accessible
       concat/hybridconcat     11916164384 online,accessible
           slice/ssd0s1             195093024 online,accessible (ssd0:/dev/dis
           stripe/diskstripe       11721071360 online,accessible (unit size: 1
               slice/dsk0s0          1172107168 online,accessible (dsk0:/dev
               slice/dsk1s0          1172107168 online,accessible (dsk1:/dev
               slice/dsk2s0          1172107168 online,accessible (dsk2:/dev
               slice/dsk3s0          1172107168 online,accessible (dsk3:/dev
               slice/dsk4s0          1172107168 online,accessible (dsk4:/dev
               slice/dsk5s0          1172107168 online,accessible (dsk5:/dev
               slice/dsk6s0          1172107168 online,accessible (dsk6:/dev
               slice/dsk7s0          1172107168 online,accessible (dsk7:/dev
               slice/dsk8s0          1172107168 online,accessible (dsk8:/dev
               slice/dsk9s0          1172107168 online,accessible (dsk9:/dev
    subvol/hybridfs/log         262144 online,accessible
       concat/extlog               262144 online,accessible
           slice/ssd0s0                262144 online,accessible (ssd0:/dev/dis

The mkfs.xfs command is as follows:

# mkfs.xfs -d agsize=195093024s -l logdev=/dev/lxvm/hybridfs_log \
-l size=128m /dev/lxvm/hybridfs
meta-data=/dev/lxvm/hybridfs     isize=256    agcount=62, agsize=24386628 blks
         =                       sectsz=512   attr=2
data     =                       bsize=4096   blocks=1489520548, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0
log      =/dev/lxvm/hybridfs_log bsize=4096   blocks=32768, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

# mount -o ibound=195093024 /dev/lxvm/hybridfs /mnt

ibound and Messages

When the ibound mount option is used, the XFS kernel module will log an INFO log message, indicating the maximum inode number possible. For example:

XFS: maximum new inode number is 3318592

When the ibound value is smaller than the size of the first AG, the XFS kernel module will log a WARN message, indicating that it has changed the value. For example:

XFS: ibound is too small, using 19543056

Improving Efficiency

The space for user data is rotored among the AGs. This behavior may result decreased I/O efficiency, especially for streaming workloads that create sequential files. You can adjust the allocation behavior for newly created files by using the fs.xfs.rotorstep sysctl parameter. Setting the value to 255 may provide more favorable behavior by allocating space for user data in 255 new files in an AG before moving to the next AG for allocating space for a new file in the next AG.