The DAIO (Diskomizer Asynchronous IO) File system module stores the blocks written by Diskomizer in many small files in a file system rather than in a single large file per device. This has a number of interesting effects.
It causes Diskomizer to exercise the file creation and optionally the deletion of files.
Stores a very large number of files in a single directory.
Avoids the single per file write lock present in many file systems.
Can generate races to create the same file.
The DAIO_FS module is used by setting the option AIO_ROUTINES to be FS and configuring the FILE_SIZE option. Then the devices that are specified are taken to be directories. If they do not exist then they will be created. If they do exist and you have set the option NUMBER_OF_FILES then that number of sub directories are created which in turn contain all the files with the blocks in them.
Every IO involves DAIO_FS opening a file doing the IO and then closing the file. If storing more than one block per file then the same file can be opened more than once by different threads in a process and or by different processes.
The DAIO_FS module uses the same threading model as the DAIO_PREAD module to give the appearance of asynchronous IO.
DAIO_FS Options
DAIO_FS_BLOCK_SIZE
The block size being used by DAIO_FS. It must be greater than or equal to the maximum block size defined in DISK_IO_SIZES, however if it is greater than that you will cause diskomizer to have a gap between each IO. For example if your maximum block size is 8192 bytes and you set DAIO_FS_BLOCK_SIZE to 8193 bytes you will induce a 1 byte gap between the data that is written. This can be used to create misalignment of IO and or to put “holes” in the files. It defaults to the maximum block size used in DISK_IO_SIZES.
DAIO_FS_BLOCKS_PER_FILE
The maximum number of blocks to be stored in each file.
DAIO_FS_TRUNC
If DAIO_FS_BLOCKS_PER_FILE is set to 1 then, when writing, open the file O_TRUNC so that it is truncated before each write.
DAIO_FS_UNLINK
If DAIO_FS_BLOCKS_PER_FILE is set to 1 then, when writing, unlink the file before opening it so that a new file has to be created. This has the side effect of reducing the effectiveness of the file systems caching so that pages have to be freed and re allocated.
DAIO_FS_RENAME_AND_UNLINK
If DAIO_FS_BLOCKS_PER_FILE is set to 1 then, when writing, rename the file before opening it so that a new file has to be created in addition to the old file, so the same inode can not be allocated. Then once the data is written unlink the renamed file. This has the side effect of reducing the effectiveness of the file systems caching so that pages have to be freed and re allocated
DAIO_FS_O_XATTR
Open the files with the O_XATTR flag so that the data files are stored as file attributes; see fsattr(5). This has the very useful side effect of making the shutdown of Diskomizer much quicker, since removing the file automatically removes it's attributes Diskomizer does not have to do this.
DAIO_FS_NOT_XXXAT
Do not use openat(2), renameat(2) and unlinkat(2) even when they are available. Use open(2), rename(2) and unlink(2) instead. This option can not be used with DAIO_FS_O_XATT.