Product SiteDocumentation Site

3.2.4. Exercise 4

This exercise demonstrates the need for the filestreams allocator for a particular workload.
  1. Create a file system with a small AG size:
    # mkfs.xfs -d agsize=64m /dev/sdb7 > /dev/null
    # mount /dev/sdb7 /test
    # chmod 777 /test
    
  2. Create ten 10MB files concurrently in two directories:
    # cd /test
    # mkdir a b
    # for dir in a b; do
    > for file in `seq 0 9`; do
    > xfs_mkfile 10m $dir/$file
    > done & 
    > done; wait 2>/dev/null
    
  3. Note that the all the inodes in the same directory are in the same AG:
    # ls -sid * */*
    
  4. What about the file data? Use xfs_bmap -v to examine the extents of each of the files:
    # xfs_bmap –v a/*
    # xfs_bmap –v b/*
    
  5. Note that once the original AG was used, the files from both directories are interleaved in the next allocation group. Any read-ahead for files in directory a that assumes the files are contiguous on disk will start reading files from directory b instead.
MediaWiki Appliance - Powered by TurnKey Linux