HP OpenVMS System Manager's Manual, Volume 2:... |
Performance Considerations |
|
|
| |
With the Reserved Memory Registry you can:
The Reserved Memory Registry includes the ability to specify that the preallocated pages are to be zeroed during the booting of the system. This option reduces the time required to create the memory-resident global demand-zero section.
Another option within the Reserved Memory Registry is to include the size of the page tables required to map to the memory-resident global section in the reserved memory. If this option is specified and the reserved memory is being used for a memory-resident global section, the memory-resident global section is created with shared page tables.
Using the Reserved
Memory Registry ![]()
OpenVMS provides a mechanism to reserve non-fluid memory for
use within a memory-resident global demand-zero section. The reserved
memory may either be simply a deduction from the system's nonfluid memory
size or pages may be preallocated.
Using the Reserved Memory Registry ensures that AUTOGEN tunes the system properly to not include memory-resident section pages in its calculation of the system's fluid page count. AUTOGEN sizes the system pagefile, number of processes and working set maximum size based on the system's fluid page count. A system can experience severe performance problems if AUTOGEN adjusts parameters based upon a fluid page count that does not account for the physical memory that is permanently reserved for some other purpose.
Using the Reserved Memory Registry also ensures that contiguous, aligned memory is available for memory-resident sections when the allocate option is used.
| Although this section describes how to use the reserved memory registry for global sections, this feature can be used for other privileged applications. |
Reserved Memory Registry
Data File ![]()
Consumers of reserved, nonfluid memory enter the characteristics
of the memory into a data file that is read during the system initialization
(boot-time). The mechanics of manipulating the data file are similar
to SYS$LOADABLE_IMAGES:VMS$SYSTEM_IMAGES.DATA (indicates installation-specific
executive loaded images).
This file is called:
SYS$SYSTEM:VMS$RESERVED_MEMORY.DATAThe file is maintained by the SYSMAN utility (as is the executive loaded image data file).
AUTOGEN ![]()
The Reserved Memory Registry file, VMS$RESERVED_MEMORY.DATA,
is read by the AUTOGEN feedback mechanism and factors into the setting
of the system's fluid page count. AUTOGEN sizes the system pagefile, number
of processes and working set maximum size based on the system's
fluid page count.
Adding Entries to the
Reserved Memory Registry ![]()
You add an entry to the data file by using the SYSMAN utility.
The SYSMAN command is as follows:
SYSMAN RESERVED_MEMORY ADD gs_name -
/GROUP = n -
/SIZE = {size of reserved memory, unit: MB} -
/[NO]ALLOCATE -
/[NO]ZERO -
/[NO]PAGE_TABLES1. size >= 4 MB: physically aligned on a 4 Mbyte boundary 2. size < 4 MB: physically aligned on a 512 KB boundary
Removing Entries from
the Reserved Memory Registry ![]()
You can remove a reserved memory entry by issuing a SYSMAN
command using the following format:SYSMAN> RESERVED_MEMORY REMOVE gs_name /GROUP
= n
The specified gs_name is the name of the
memory-resident section associated with the entry being removed from
the Reserved Memory Registry. A name must be specified.
The value n specified by the /GROUP qualifier is the UIC group number (in octal) associated with the memory-resident section being removed. If the memory-resident global section is a group section, you must specify the /GROUP qualifier. If the memory-resident global section is a system global section, you must not specify the /GROUP qualifier.
If page tables are reserved for the named memory-resident global section, the additional reserved memory is also removed.
The REMOVE command only removes entries from the Reserved Memory Registry data file; it does not affect memory within the running system.
Allocating Reserved
Memory ![]()
During system initialization, the VMS$RESERVED_MEMORY.DATA
data file is read.
For each entry in the data file, the number of megabytes is deducted from the system's fluid page count for this memory-resident global section as specified by the /SIZE qualifier on the RESERVED_MEMORY ADD command. If /PAGE_TABLES was specified, the amount of memory required for the shared page tables mapping the memory-resident global section is deducted from the system's fluid page count as well.
If /ALLOCATE was specified on the RESERVED_MEMORY ADD command, a suitable chunk of physical pages is also allocated and set aside for the memory-resident global section. If /PAGE_TABLES was specified, an additional chunk of physical pages is allocated and set aside for the shared page tables. The pages have a physical alignment appropriate for the largest granularity hint factor for the given sized chunk. If /ZERO was specified, the pages are zeroed during system initialization or when the system is idle. If /ZERO was not specified or if /NOZERO was specified, the pages are zeroed at the time the memory-resident global section is created.
If the system parameter STARTUP_P1 is set to MIN, entries in the Reserved Memory Registry entries are ignored and memory is not reserved.
If errors are encountered during system initialization while processing the Reserved Memory Registry data file, with reserving system fluid pages, or with allocating contiguous, aligned physical pages, an error message is issued to the console and the system continues to boot.
Freeing Reserved Memory ![]()
In the running system, you can free reserved memory by entering
SYSMAN command using the following format:SYSMAN> RESERVED_MEMORY FREE gs_name /GROUP = n
The specified gs_name is the name of the
memory-resident section associated with the entry being freed from the
Reserved Memory Registry. A name must be specified.
The value n specified by the /GROUP qualifier is the UIC group number (in octal) associated with the memory-resident section being freed. If the memory-resident global section is a group global section, you must specify the /GROUP qualifier. If the memory-resident global section is a system global section, you must not specify the /GROUP qualifier.
If physical pages were not preallocated during system initialization for this global section, the reserved memory is simply added to the system's fluid page count. Otherwise the physical pages are deallocated onto the system's free or zeroed page list. The system's fluid page count is adjusted to include the deallocated pages.
If page tables are also reserved for the named memory-resident global section, the reserved memory for the shared page tables is also freed.
If the reserved memory is in use by the named memory-resident global section, the amount of reserved memory not currently in use is freed.
The RESERVED_MEMORY FREE command does not affect the Reserved Memory Registry data file contents, it only affects the memory within the running system.
Displaying Reserved
Memory ![]()
Two different places hold reserved memory information, the
Reserved Memory Registry data file and the Reserved Memory Registry
in the running system created during system initialization based
on the entries in the data file.
Different display mechanisms may be used depending on where the information about the reserved memory originates.
There are three mechanisms for displaying the Reserved Memory Registry within the running system: SYSMAN, the DCL SHOW MEMORY command and SDA.
gs_name is the name of the
memory-resident global section associated with the entry being displayed
from within the running system. If gs_name is not specified, the
reserved memory for all registered global sections is displayed.Using Reserved Memory ![]()
The system services SYS$CREATE_GDZRO and SYS$CRMPSC_GDZRO_64
call internal kernel mode OpenVMS Alpha or I64 routines to use the
reserved memory registered in the Reserved Memory Registry.
The global section need not be registered in the Reserved Memory Registry. If the global section name is registered in the Reserved Memory Registry, the size of the global section need not exactly match the size of the reserved memory. If the global section is not registered, or if /NOALLOCATE was specified when the global section was registered in the Reserved Memory Registry, the fault option is used for the memory-resident global DZRO section. If the size is greater than the size of the reserved memory, the system service call to create the memory-resident global DZRO section fails if there are not enough additional fluid pages within the system.
If /ALLOCATE was specified when the global section was registered in the Reserved Memory Registry, the allocate option is used for the memory-resident global DZRO section. The size of the global section must be less than or equal to the size of the reserved, preallocated memory or the error SS$_MRES_PFNSMALL is returned by the system service call.
Returning Reserved
Memory ![]()
When a memory-resident global section is deleted, the physical
pages used for that global section are deallocated to the free page
list if physical pages were not preallocated for this global section.
The system's fluid page count is adjusted only for those pages not
reserved in the Reserved Memory Registry for this global section.
When a memory-resident global section is deleted, the physical pages used for that global section are returned to the Reserved Memory Registry if physical pages were preallocated for this global section. The physical pages are not deallocated to the free page list and are still reserved. No adjustment is made to the system's fluid page count.
Reserved memory can be freed to the running system only by using the RESERVED_MEMORY FREE command to the SYSMAN utility.
| Permanent global sections are deleted by calling SYS$DGBLSC and upon the last reference to the global section. Nonpermanent global sections are simply deleted upon last reference to the global section. |
Application Configuration ![]()
The configuration of an OpenVMS Alpha or I64 application that
uses memory-resident global sections performs the following steps:
|
|