![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: Dear Wizard My code is written in DECC and it'll call fwrite() when it needs. However, without calling to fflush() and fsync() , I would like to know when will the data be flushed to disk by VMS. Thanks. Regards Wichaya Charnlertlakha The Answer is : DEC C (eventually) passes the data to OpenVMS RMS, and RMS then (eventually) writes the data to the disk device, and the disk device caches then (eventually) re-orders and writes the data to the physical media when each believes it is appropriate to do so. Writing data out to physical media is very slow, and I/O operations are generally reorganized and attempts to avoid or to perform the I/O in an efficient manner are made, regardless of the I/O pattern used within the application. Unless OpenVMS and the storage hardware is explicitly requested to perform the I/O otherwise, of course. The default caching behaviours are generally appropriate, but specific applications or system configurations may require operations ranging from fflush and fsync calls, to RMS sys$flush calls, to the installation of (optional) batteries in the StorageWorks shelves to maintain the I/O caches over any (transitory) power failures. Please see previous related discussions here, including "fflush slows performance? (rundown)".
|