[an error occurred while processing this directive]

HP OpenVMS Systems

ask the wizard
Content starts here

RMS $open, $close, I/O performance, transactions?

» close window

The Question is:

 
Hello Mr. Wizard,
 
 
I am currently writing software that needs to open (sys$open), write to and
 then close a large file at a frequency of potentially once a second.
 
I need to access the file using RMS in Block I/O mode for performance reasons.
 
If I keep opening and closing the file to update it (which i have to do), I am
 worried that the disk will rapidly clog up with many versions of what will be
 a large file. I don't think I can concurrently purge the file as I expect the
 purge rate to be exc
eeded by the creation rate.
 
WHAT I WOULD LIKE TO KNOW IS:
Can I open/write/close the file in such a way that the same version gets
 written to?
 
Thankyou,
 
Tom
 


The Answer is :

 
  Performance of this application will be poor, and the record
  access mode has little direct relevence to thi eventuality..
 
  Block I/O is not necessarily a performance benefit, and may
  well be overshadowed by the overhead of the $open and the
  $close and the associatged volume oeprations.
 
  You can use $create for the purpose of opening an existing
  file, or creating it if the file does not exist.  See the
  CIF flag for details.
 
  Again, opening and closing files in this fashion will not
  necessarily have the performance you appear to seek -- you
  will want to keep the file(s) open, and will want to use
  available operations to flush to disk and/or RMS or database
  journal activities and/or utilize RTR or similar
  transaction-related tools.
 
 

answer written or last revised on ( 19-MAR-2004 )

» close window