option #36

File flushing

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS

Synergy writes data directly to the operating system, but in many cases, the operating system caches data before writing it to the actual media. A flush operation is required to bypass this behavior. By default, the runtime does not flush WRITE, STORE, or DELETE operations on indexed, sequential, and relative files to disk. (The runtime does, however, flush ISAM files to disk after a CLOSE operation.) In addition, the runtime buffers WRITES to sequential and relative files (open in output or append mode) in 32K buffers and only writes the cache buffer to the operating system when the buffer is full. This is done to improve sequential write performance, especially over mapped drives.

Setting system option #36 enables the flushing feature of the runtime for non-sequential files that are not opened in exclusive mode and are not open for output. Option #36 uses the O_DSYNC file open flag on UNIX and the FILE_FLAG_WRITE_THROUGH CreateFile flag on Windows. This ensures that all writes to the disk are written immediately without buffering for data integrity; however, the file modification time is still cached. This is the best compromise between performance and guaranteed data integrity. If system option #36 is set and you want to enable flushing for sequential files, add a FLUSH statement on the channel, immediately following the OPEN. Using a FLUSH statement disables the sequential write buffering.

On most Windows and UNIX systems, using system option #36 is faster than using the FLUSH statement. (On Windows it is significantly faster.) It is slower, however, than using the FULLRESILIENT ISAM file creation option, because system option #36 flushes both index and data on every write, while FULLRESILIENT flushes only the data file.

On OpenVMS, if system option #36 is set, nonoutput files are not opened for deferred write or write behind caching.

See FLUSH for more details.

Note

The rpsutl program disables system option #36. This improves performance for those who have system option #36 set in their environment.