Open System Services Programmer's Guide
NOTE: Some of these actions affect the configuration of the fileset or of the disk volume and are
not controlled by the application.
• Minimize the number of open operations such as open() and opendir().
• Minimize the use of pipes and FIFOs between processors.
• Minimize the use of AF_UNIX sockets between processes.
• Minimize the use of shared opens (more than one process sharing an open file descriptor)
between processors.
• Minimize the use of operations that alter directory contents, such as creat(), link(),
unlink(), and rename().
• Use file caching, if appropriate (see “File Caching”).
• Use free-space table caching. For more information, see the SCF Reference Manual for the
Storage Subsystem.
• Use O_SYNC when reliability, not performance, is most important.
NOTE: HP recommends that the S_NONSTOP extension not be used in new applications. The
S_NONSTOP extension is ignored on nodes running J-series RVUs or an RVU more recent than
G06.26 or H06.03; the standard O_SYNC feature used with the FTIOMODE attribute provides
better data integrity and improved performance.
• Increase the size of the disk cache, if appropriate. If disk cache is too small, disk processes
might perform unnecessary physical disk I/Os. If disk cache is too large, it can induce
unnecessary memory swap operations and cache faults. (Swaps are also disk I/Os and
therefore time consuming.) Typically, the default values for disk cache is small, so performance
can be slow. There are a number of factors involved in determining the best disk cache size
for your system. For more information, see the SCF Reference Manual for the Storage Subsystem
and the Measure User’s Guide.
File Caching
By default, the OSS environment provides a file cache for regular files in each processor that does
input or output with a disk volume that contains OSS files. HP strongly recommends that you leave
OSS file caching enabled. This cache is necessary for the fault tolerant behavior controlled by the
fileset FTIOMODE or NORMALIOMODE attributes.
If file caching is enabled, the OSS file system determines whether a file should be cached.
If OSS file caching is in effect, the OSS file system reads large blocks of data into its own processor
cache buffer and then resolves user application read requests from that cache buffer. If OSS file
caching is not in effect, the OSS file system does not perform any local caching of data and all
requests are passed to the disk process.
If the OSS file system determines that a file should be cached and all opens of the file are for read
access, then the file is cached on all processors that have opens of the file. The opens must be for
read access only.
The caching state of a file is dynamic and can change as opens, closes, and other events occur
on a file.
You should decide whether to use OSS file caching when you first configure a fileset, because
changing the use of OSS file caching requires you to stop the fileset.
Although the storage subsystem can be used to enable or disable file caching for a volume, HP
recommends that you not modify OSS file caching at the disk level. The FTIOMODE and
NORMALIOMODE fileset attributes provide better control over fault-tolerance and performance
for file input or output.
Performance Considerations 87