Concurrent I/O (CIO) is a special form of I/O for file access, different from the normal file access. This form of I/O allows multiple processes to read or write to the same file without blocking other read() or write() operations.
CIO for VxFS can be enabled by setting mount option "-o cio" when mounting VxFS filesystem and setting system call of ioctl's cache-advisory "VX_CONCURRENT" on specific file.
With the VX_CONCURRENT advisory set on a file, the reads and writes are not serialized similar to character devices. Applications that require high performance for accessing data and do not perform overlapping writes to the same file generally use this advisory. An example is database applications. Such applications perform their own locking at the application level to avoid overlapping writes to the same region of the file.
It is the responsibility of the application or threads to coordinate write activities to the same file when using the VX_CONCURRENT advisory to avoid overlapping writes. The consequence of two overlapping writes to the same file is unpredictable.
The best practice for applications is to avoid simultaneous write operations to the same region of the same file.
If the VX_CONCURRENT advisory is set on a file, VxFS performs direct I/O for reads and writes to the file. As such, concurrent I/O has the same alignment requirements as direct I/O.
To improve VxFS performance further, you may also consider additional mount options "noatime" and "nomtime" with "cio", as they can further reduce the filesystem metadata updates each time a file is written or read. These flags eliminate access and modification time updates on the inode data structure, as long as that isn't concerned by applications.