HP OpenVMS Systems

ask the wizard
Content starts here

Storing data in global sections?

» close window

The Question is:

 
 
Dear Wizard,
 
 
I have a memroy-mapped file ($crmpsc, global section, mapped into the P0
 address space) which is 6714 pages (of 8K size each) on an Alpha running
 OpenVMS V7.1-2. I am using this as a store for several balanced binary-trees,
 which will be accessed by sever
al jobs.
 
I am in a process of making some modifications to this global section to store
 more information. This certainly needs an increase in the size of the global
 section. It will grow upto 5 or 6 times its current size! But, if we increase
 the size of the globa
l section, there will definitely be some impact on the system resources and
 hence the performance. (This is a real-time system).
 
Any suggestions or thoughts?
Also, how do I calculate the optimum value for the GBLPAGES parameter?
 
Here are some information about my system:
------------------------------------------
$SHOW CPU
 
<My Machine>, a AlphaServer DS20 500 MHz
Multiprocessing is ENABLED. Streamlined synchronization image loaded.
Minimum multiprocessing revision levels: CPU = 1
 
PRIMARY CPU = 00
Active CPUs:      00
Configured CPUs:  00 01
 
 
$SHOW MEMORY
 
              System Memory Resources on 24-MAR-2000 10:56:16.67
 
Physical Memory Usage (pages):     Total        Free      In Use    Modified
  Main Memory (2176.00Mb)         278528      184980       87962        5586
 
Virtual I/O Cache (Kbytes):        Total        Free      In Use
  Cache Memory                      3200         504        2696
 
Granularity Hint Regions (pages):  Total        Free      In Use    Released
  Execlet code region                512           0         373         139
  Execlet data region                 80           1          79           0
  S0/S1 Executive data region        641           0         641           0
  S2 Executive data region          1360           0        1360           0
  Resident image code region        1024           0         320         704
 
Slot Usage (slots):                Total        Free    Resident     Swapped
  Process Entry Slots                221         158          63           0
  Balance Set Slots                  219         158          61           0
 
Dynamic Memory Usage (bytes):      Total        Free      In Use     Largest
  Nonpaged Dynamic Memory       10231808     6382848     3848960     2880640
  Paged Dynamic Memory           2686976     1028544     1658432     1000736
 
Buffer Object Usage (pages):                  In Use        Peak
  32-bit System Space Windows (S0/S1)              0           3
  64-bit System Space Windows (S2)                 0           0
 
Memory Reservations (pages):                Reserved      In Use        Type
Total (0 Mb reserved)                              0           0
 
Paging File Usage (blocks):                     Free  Reservable       Total
  DISK$<My Node>_V71-2:[SYS0.SYSEXE]SWAPFILE.SYS
                                               28288       28288       28288
  DISK$<My Node>_V71-2:[SYS0.SYSEXE]PAGEFILE.SYS
                                               99664       93824       99968
  LOGGINGDISK:[SYS0.SYSEXE]PAGEFILE3.SYS;1
                                             2111536     1996768     2113408
  LOGGINGDISK:[SYS0.SYSEXE]PAGEFILE4.SYS;1
                                             2111536     1997424     2113408
 
Of the physical pages in use, 70631 pages are permanently allocated to OpenVMS.
 
$SHOW MEMORY/POOL/FULL
 
              System Memory Resources on 24-MAR-2000 11:20:12.89
 
Nonpaged Dynamic Memory      (Lists + Variable)
    Current Size (bytes)      10231808    Current Size (pagelets)      19984
    Initial Size               4956160    Initial Size (pagelets)       9680
    Maximum Size              20840448    Maximum Size (pagelets)      40704
    Free Space (bytes)         6408512    Space in Use (bytes)       3823296
    Largest Variable Block     2880640    Smallest Variable Block         64
    Number of Free Blocks         1529    Free Blocks LEQU 64 Bytes      365
    Free Blocks on Lookasides      463    Lookaside Space (bytes)     392320
 
(No Bus Addressable Memory allocated)
 
Paged Dynamic Memory
    Current Size (PAGEDYN)     2686976    Current Size (pagelets)       5248
    Free Space (bytes)         1028544    Space in Use (bytes)       1658432
    Largest Variable Block     1000736    Smallest Variable Block         16
    Number of Free Blocks          287    Free Blocks LEQU 64 Bytes      275
 
$INSTALL LIST/GLOBAL
 
        System Global Sections
 
	. . .
DB               (00000000) WRT          PRM SYS
 Pgltcnt/Refcnt=107424/13428
	. . .
 
   597 Global Sections Used,  343312/76336 Global Pagelets Used/Unused.
 
Sysgen Parameters:
-----------------
Parameters in use: Active
 
Parameter Name           Current    Default     Min.      Max.     Unit  Dynami`
 
PFCDEFAULT                     64         64         0       2032 Pagelets   D
 internal value                 4          4         0        127 Pages      D
GBLSECTIONS                  1240        250        80      65535 Sections
GBLPAGES                   419635      30720     10240         -1 Pagelets   D
 internal value             26228       1920       640         -1 Pages      D
GBLPAGFIL                    3072        128        32         -1 Pages      D
WSMAX                      354208       4096      1024    8388608 Pagelets
 internal value             22138        256        64     524288 Pages
NPAGEDYN                  4956160    1048576    163840         -1 Bytes
NPAGEVIR                 20840448    8388608    163840         -1 Bytes
PAGEDYN                   2686976     212992     65536         -1 Bytes
WSINC                        2400       2400         0         -1 Pagelets   D
 internal value               150        150         0         -1 Pages      D
WSDEC                        4000       4000         0         -1 Pagelets   D
 internal value               250        250         0         -1 Pages      D
GROWLIM                       239         63         0         -1 Pages      D
BORROWLIM                     239        300         0         -1 Pages      D
NPAG_INTERVAL                  30         30         0         -1 Seconds    D
NPAG_GENTLE                    85         85         0        100 Percent    D
NPAG_AGGRESSIVE                50         50         0        100 Percent    D
NPAG_BAP_MIN                    0          0         0         -1 Bytes
NPAG_BAP_MAX                    0          0         0         -1 Bytes
NPAG_BAP_MAX_PA                 0         -1         0         -1 PhysAddr
NPAG_RING_SIZE               2048       2048         0         -1 Entries
FREELIM                       239         32        16         -1 Pages
 
 
Thanks in advance!
 
Regards,
GK
 
 


The Answer is :

 
  Six times the existing 6714 pages (at 8 kilobytes per page) is
  roughly 300 megabytes, which is not particularly large as OpenVMS
  files go.  Actually, 300 megabytes of data is on the smaller side
  as far as many common OpenVMS environments go...
 
  The GBLPAGES settings is a "blade guard", and has no optimal setting
  or tuning significance -- the parameter exists solely to ensure that
  no accidently allocates more than the specified amount...
 
  The value of WSMAX does have a potential performance impact.  Those
  processes mapping to a 300MB global section would optimally have a
  working set larger than that of the section, otherwise you will tend
  to see pagefaulting -- most faults will probably be soft faults, but
  this is still overhead.
 
  If this global section is that single biggest memory-consuming
  application on the system, and is garantueed to have the 'right' to
  this memory all the time, then you should consider using RESERVED
  MEMORY for it -- this does have potential for a positive performance
  impact.  (The single biggest drawback of reserved memory is that is
  is reserved.  That is, you can not use it for anything else if the
  application is not there to use it.  Another lesser drawback involves
  the need for a reboot in order to adjust the reserved memory settings.)
 
  A three megabyte virtual I/O cache on a 2 gigabyte system is rather
  low.  If this application is heavily I/O bound, you will want to
  experiment with a larger VIOC setting -- somewhere closer to 3% to
  10% of the total system memory.
 
  Depending on the particular file access required, also seriously
  consider using RMS files and RMS global buffer support -- by implementing
  your own file system and caching, you get to deal with the issues around
  memory caching and interlocking (see topic 2681), and you cannot easily
  extend a scheme based on global sections out into an OpenVMS Cluster.
  By the time you get all this working correctly and reliably, you may
  well have implemented everything that RMS files and global buffers
  already provides for you.
 
  Also please see existing discussions including topics (6960), (4487),
  (4051), (3791), (3635), (3365), (2486), (2637),  (2181), (860), and
  others -- these are discussions that can be relevent to correct
  operations of shared memory on OpenVMS.
 

answer written or last revised on ( 27-AUG-2001 )

» close window