?s about RMS buffering, performance CHAMP Service Request Extract Sequence Number: C991103-000433Owner: 312840 Customer: MARK LYSYJ, TRAVELCENTERS OF AMERICA ?s about RMS buffering, performance WorkUnit 0001 \+----------------------- Beginning of Screener's Text -----------------------+ \ vax ovms 7.2 When performing setrms/system/index/buffercount=x (value), \does that value apply for the entire process or for each indexed file?>>> \dmw30475 \+--------------------------- End of Screener's Text --------------------------+ PROBLEM As above. Mark had lots of questions about RMS buffering, performance. Some of the questions bordered on requesting proprietary info. SOLUTION Discussed questions about RMS determination of a file's multibuffer count; affect of bucket size on sequential and keyed access; affect of index depth on performance; etc. Sent articles listed below, with attached letter. Mark will be getting into global buffering next, so I also sent along info on that. INET schnabel.ken@tatravelcenters.com Rules of Thumb: Number of Buffers For Indexed Files [OpenVMS] SYSGEN Parameters Related To RMS Global Buffers [OpenVMS] Guidelines for Indexed File Optimization and Performance [OpenVMS] Annotated EDIT/FDL Optimize Script -------------------------------------------------------------------------------- Dear Mark, The attachment RMSPERF.TXT contains the articles I described during our phone conversation. I've also attached information that explains the circumstances in which a request for global buffering is ignored, since this would be a factor in your decision to use global buffering. The first article in this shipment describes how to determine the number of buffers needed to place an indexed file's index structure in cache. To use the formula in this article, you'll need to know the number of index buckets in the file. Output from the command ANALYZE/RMS/STAT will give you this information. For example, here's how you can use ANALYZE/RMS/STAT output to determine the number of buckets in a file with 4 keys: $ ANALYZE/RMS/STAT/OUTPUT=SYSUAF.ANL SYSUAF.DAT $ SEARCH SYSUAF.ANL "count of index blocks" Count of Index Blocks: 15 ; key 0 Count of Index Blocks: 6 ; key 1 Count of Index Blocks: 4 ; key 2 Count of Index Blocks: 2 ; key 3 $ SEARCH SYSUAF.ANL "index bucket size" Index Bucket Size: 3, Data Bucket Size: 3 Index Bucket Size: 2, Data Bucket Size: 2 Index Bucket Size: 2, Data Bucket Size: 2 Index Bucket Size: 2, Data Bucket Size: 2 # buckets in key 0 = (15 blocks) / (3 blocks per bucket) = 5 # buckets in key 1 = (6 blocks) / (2 blocks per bucket) = 3 # buckets in key 2 = (6 blocks) / (2 blocks per bucket) = 2 # buckets in key 3 = (6 blocks) / (2 blocks per bucket) = 1 -- Total buckets 11 I also recommend these topics in the "Guide to OpenVMS File Applications" (part of the OpenVMS documentation), which will help to "cement" together the information in the articles: · Chapter 3 (Performance Considerations. Contains tuning info for indexed, sequential and relative data files. Of special interest is Section 3.5 (Tuning an Indexed file). · Section 3.6 (Monitoring RMS Performance). Demonstrates how to enable statistics gathering (SET FILE/STAT) and monitor RMS buffer performance (MONITOR RMS/ITEM=CACHING). · Section 4.1.2 (Using File Definition Language). Describes how to use the FDL Editor to change the internal structure (key definitions, etc.) of an indexed file. · Section 7.3 (Local and Shared Buffering Techniques). Explains the concept of local and global buffering of data files. · Section 10.3 (Optimizing and Redesigning File Characteristics). Describes a step-by-step method of tuning data files. I hope this information will prove useful! Sincerely, Mary Henning COMPAQ Services Language Support Team Phone: 800-354-9000 CIRCUMSTANCES IN WHICH A GLOBAL BUFFER REQUEST IS IGNORED 1) If RMS locking is not required. Global buffers rely on locks and lock value blocks to maintain their integrity. They require RMS locking to be enabled. RMS ignores the request for global buffers for a file that is opened with access/sharing options not requiring RMS locking. Instead, it uses only the buffers defined for the local cache. RMS locking is turned on if there is: a) any type of shared write access (FAB$B_SHR = SHRPUT, SHRUPD, SHRDEL) b) some write access (FAB$B_FAC = PUT, UPD, DEL, TRN) while allowing other readers (FAB$B_SHR = SHRGET). This combination requires the write accessor to be the first accessor to the file. c) the multistreaming (MSE) sharing option is specified (FAB$B_SHR). If the application only requires read-only access and read-only sharing, then global buffers can be obtained by specifying the MSE option. This option, however, does turn on all the regular RMS locking mechanisms. The only advantage of specifying the MSE option rather than specifying some write sharing option is that the file will be protected against any user opening the file for any non-read access. 2) If FAB$W_GBC is 0 for this record stream. When a file is opened, the global buffer count is returned by RMS in the FAB$W_GBC field. After the $OPEN but before the $CONNECT, the application may zero out the FAB$W_GBC field, thereby requesting that global buffers not be used by this stream. 3) If the file is opened for block I/O (BIO). RMS buffers (global and local) are allocated for record I/O processing. 4) If the file is a process permanent file (a file opened by DCL). 5) If the image for the application is linked requesting no P0 RMS buffers. This requires that the LINK command used to create the image file must specify a linker options file that includes the statement: IOSEGMENT=,NOP0BUFS 6) If RMS_GBLBUFQUO is exhausted after a file has been opened with global buffers. This SYSGEN parameter determines the number of RMS global buffers that can be active simultaneously on a single system. If the VMS system runs out of RMS_GBLBUFQUO after a process has opened a file with global buffers, no error is returned to the user. The current contents of the global buffer(s) are simply discarded (that is, the contents of some bucket(s) are no longer cached).