[comp.os.vms] Thoughts On Getting RMS To Share Buffers For Files Opened SHARED...

CLAYTON@XRT.UPENN.EDU ("Clayton, Paul D.") (07/04/88)

Michael Zehr has asked a question regarding the use of shared RMS files on a 
VMS system and how to accomplish it. It was part of an answer on shared images.

You do not want to INSTALL a data file in orer to have it shared among users
on the same processor, or members of the same VAXCluster. 

What you DO want to have is the following:

1. Have the GLOBAL BUFFER count, which can be shown by doing a $DIR/FULL of the
file set to a NON-ZERO value. This value can be set/changed by the DCL command
'$SET FILE/GLOBAL_BUFFER=x yyy'. Where x is the number of global buffers to have
and yyy is the file that is to have them when its opened. This can be changed 
anytime the file is not open. Depending on bucket size, and other items, global 
buffer counts from 5 to 100 (or more) are not unusual.

2. Enough GLOBAL SECTIONS free on the system in order for VMS to map a system
global section for it. To see if enough sections are free invoke the INSTALL
utility and do the SHOW/GLOBAL command. The bottom of the resulting display 
will tell you how many sections are still free. VMS needs one section PER
file that has global buffers defined PER processor that has the file open. You
may want to increase the SYSGEN parameter GBLSECTIONS, and then reboot the 
system for it to take effect. You can also verify how many RMS files ARE 
using global buffers while you are in the INSTALL utility. When the 
SHOW/GLOBAL command is entered, all the global sections with the prefix of 
"RMS" are for files being shared among users.

3. Enough free pages in the PRIMARY page file in order to provide a backing 
store for the global section. VMS 4.x systems must use the primary paging 
file, and not enough space available can reduce the number of buffers that are
used to store data in. It is a VERY good idea to have a large 2nd, and/or 3rd
page file installed, thus leaving the primary page file relatively free for 
shared files. The creation and installation of page files can be done at any
time. There is a need to have the SYSGEN parameter PAGFILCNT set to the max.
number of page files that can installed in the system at any one time. I 
recommend that both PAGFILCNT and SWPFILCNT be set to '5' or '10' in order to
let you add appropiate files as they are needed should the user load drasticly
change on you. A reboot is needed for this parameter to take effect.

4. The SYSGEN parameter GBLPAGFIL should be set to the same size as the primary
page file. DO NOT SET IT LARGER. This parameter tells the system how much of the
primary page file it can use for global buffer sharing. You have to reboot for
this parameter to take effect.


5. Then the user has to OPEN the file shared for it to be truly shared among the
users with the buffers holding the data only created once. 

There is NOTHING extra that has to be done for other nodes in a VAXCluster to
also have the file opened shared on their processor. VMS will create a global
section, and what ever locks are needed, on each processor that has the file 
open. VMS will also cooridinate the data in the buffers between processors in
a VAXCluster. This is where the Distributated Lock Manager lives and works.

Who said sharing files only involved opening them shared!! :-)

pdc

Paul D. Clayton 
Address - CLAYTON%XRT@CIS.UPENN.EDU

Disclaimer:  All thoughts and statements here are my own and NOT those of my 
employer, and are also not based on, or contain, restricted information.