Hands-On Session Parallel IO #2:
Parallel IO: Exploring Lustre striping

Objective:

Exercise 1 : Lustre Striping

fio is a tool that will spawn a number of threads or processes doing a particular type of io action as specified by the user.

Setting striping on a Lustre filesystem

Lustre allows you to modify three striping parameters for a file: The default parameters on raijin:/short are count=2, size=1MB, index=-1, but these can be changed and viewed on a per-file or per-directory basis using the commands:

% lfs setstripe [file,dir] [-c count] [-S size] [-i index]

% lfs getstripe [file,dir]
Note: for a size parameter of 1MB, use -S 1M.

A file automatically inherits the striping parameters of the directory it is created in, so changing the parameters of a directory is a convenient way to set the parameters for a collection of files you are about to create. For instance, if your application creates output files in a sub-directory called output/, you can set the striping parameters on that directory once before your application runs, and all of your output files will inherit those parameters.

  1. In your /short/c37 directory for this session, create a directory called testIO, run lfs getstripe ./testIO. Explain the output of the command, use the man pages if required.
  2. Using the sub-directory called testIO, for fio to create temporary files in, use fio, to measure parameters for 4 threads of IO running on /short. The following options creates 2 threads (--thread --numjobs=2):
    fio/fio --ioengine=libaio --gtod_reduce=1 --bs=1024K  --size=1G \
      --readwrite=write --thread --numjobs=2 --name=test --directory=./testIO
    
    and will produce output like:
    test: (g=0): rw=write, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=1
    ...
    Starting 2 threads
    Jobs: 2 (f=2)
    test: (groupid=0, jobs=1): err= 0: pid=22754: Mon May 15 18:25:09 2017
      write: IOPS=627, BW=628MiB/s (658MB/s)(1024MiB/1631msec)
      ...
    test: (groupid=0, jobs=1): err= 0: pid=22755: Mon May 15 18:25:09 2017
      write: IOPS=652, BW=653MiB/s (684MB/s)(1024MiB/1569msec)
      ...
    Run status group 0 (all jobs):
      WRITE: bw=1256MiB/s (1317MB/s), 628MiB/s-653MiB/s (658MB/s-684MB/s), io=2048MiB (2147MB), run=1569-1631msec
    
    The command ls ./testIO will display the temporary files fio generated.

  3. Fill in the below table, using FIO for the following Lustre stripe sizes and Lustre stripe counts for a 1GB file, utilizing a sequential write workload. Complete the following table, and comment on the trends:
  4. Stripe Size (MB)Stripe Count No of ThreadsWorking Set (MB) Block Size (KB)Time Taken (ms) Data Written (MB)IOPS B/W (MB/sec)
    1-1410241024    
    12410241024    
    14410241024    
    4-1410241024    
    42410241024    
    44410241024    
  5. (Optional) Does stripe width and stripe count make sense on a /jobfs filesystem? If not, what is analogous to these for jobfs?
  6. (Optional) Re-run the above with direct-IO (-D) and explain your results.