Document revision date: 30 March 2001

## OpenVMS System Manager's Manual

Previous | Contents | Index

## 16.3 Displaying Information About Page and Swap Files

The DCL command SHOW MEMORY/FILES displays information about the page and swap files existing on your system, including file names, sizes, and the amount of space used. For example:

    $ SHOW MEMORY/FILES
                  System Memory Resources on 19-JAN-2001 13:35:26.58

    Swap File Usage (8KB pages):                   Index        Free        Size
      DISK$PAGE_DUMPS:[SYS0.SYSEXE]SWAPFILE.SYS;2
                                                       1        7992        8248

    Paging File Usage (8KB pages):                 Index        Free        Size
      DISK$PAGE_DUMPS:[SYS0.SYSEXE]PAGEFILE.SYS;1
                                                     254       13722       16496
      Total committed paging file usage:                                    4870

The total committed paging file usage is the number of pages in the system that require pagefile space for paging. It can be bigger than the total number of pagefile pages that are available because it is unlikely that all the required space will be used for paging at one time.

## 16.4 Manually Calculating Appropriate Sizes for Dump, Page, and Swap Files

When you install or upgrade the operating system, AUTOGEN automatically calculates appropriate sizes for your system; these sizes are based on your hardware configuration and your system parameters. However, you can manually calculate the sizes for these files. The following sections describe how to determine appropriate sizes for the system page, swap, and dump files.

### 16.4.1 Calculating System Dump File Size

Sufficient space in the system dump file is critical to saving a complete crash dump. The AUTOGEN command procedure calculates an appropriate size for your system dump file. However, if you want to manually calculate the system dump file size, use the following formula, which calculates the file size required to hold a physical dump.

For SYSDUMP.DMP

On VAX systems, use the following formula:

    size-in-blocks(SYS$SYSTEM:SYSDUMP.DMP)
    = size-in-pages(physical-memory)
    + number-of-error-log-buffers * blocks-per-buffer
    + 1

On Alpha systems, use the following formula:

    size-in-blocks(SYS$SYSTEM:SYSDUMP.DMP)
    = size-in-pages(physical-memory) * blocks-per-page
    + number-of-error-log-buffers * blocks-per-buffer
    + 10

where:

size-in-pages | Is the size of physical memory, in pages. Use the DCL command SHOW MEMORY to determine the total size of physical memory on your system.
blocks-per-page | Is the number of blocks per page of memory. On Alpha systems, calculate the number of blocks per page of memory by dividing the system's page size by 512 (the size of a block). Use the following commands:
    $ PAGESIZE==F$GETSYI ("PAGE_SIZE")

    $ BLOCKSPERPAGE=PAGESIZE/512

    $ SHOW SYMBOL BLOCKSPERPAGE
number-of-error-log-buffers | Is the value of the system parameter ERRORLOGBUFFERS. This parameter sets the number of error log buffers to permanently allocate in memory.
blocks-per-buffer | Is the value of the system parameter ERLBUFFERPAGES. This parameter sets the number of pagelets (blocks) of memory in each buffer.

A large memory system or a system with small disk capacity might not be able to supply enough disk space for a full memory dump. Under these circumstances, you should set the system parameter DUMPSTYLE to the appropriate value to indicate that the system is to dump only selective information. For more information, see Section 16.5.

For PAGEFILE.SYS

If SYS$SYSTEM:SYSDUMP.DMP does not exist, the system writes crash dumps to the primary page file SYS$SYSTEM:PAGEFILE.SYS. The AUTOGEN command procedure calculates an appropriate size for your page file. However, to manually calculate the minimum page file size required to hold crash dumps, use the following formula:

On VAX systems:

    size-in-blocks(SYS$SYSTEM:PAGEFILE.SYS)
    = size-in-pages(physical-memory)
    + number-of-error-log-buffers * blocks-per-buffer
    + 1
    + 1000

On Alpha systems:

    size-in-blocks(SYS$SYSTEM:PAGEFILE.SYS)
    = size-in-pages(physical-memory) * blocks-per-page
    + number-of-error-log-buffers * blocks-per-buffer
    +10
    + value of the system parameter RSRVPAGCNT

where:

size-in-pages | Is the size of physical memory, in pages. Use the DCL command SHOW MEMORY to determine the total size of physical memory on your system.
blocks-per-page | Is the number of blocks per page of memory. On Alpha systems, calculate the number of blocks per page of memory by dividing the system's page size by 512 (the size of a block). Use the following commands:
    $ PAGESIZE==F$GETSYI ("PAGE_SIZE")

    $ BLOCKSPERPAGE=PAGESIZE/512

    $ SHOW SYMBOL BLOCKSPERPAGE
number-of-error-log-buffers | Is the value of the system parameter ERRORLOGBUFFERS. This parameter sets the number of error log buffers to permanently allocate in memory.
blocks-per-buffer | Is the value of the system parameter ERLBUFFERPAGES. This parameter sets the number of pagelets (blocks) of memory in each buffer.
RSRVPAGCNT | Is the value of the RSRVPAGCNT special system parameter.

Caution This formula calculates only the minimum size requirement for saving a dump in the system's primary page file. For most systems, the page file must be larger than this to avoid hanging the system. For more information about calculating the page file size, see Section 16.4.3.

### 16.4.2 Calculating Error Log Dump File Size

These calculations differ on OpenVMS VAX and Alpha systems:

On Alpha Systems

On Alpha systems, the AUTOGEN command procedure calculates the appropriate size of your error log dump file. However, to calculate the size of the file manually, use the following formula, which calculates the file size required to hold all the error log buffers:

    size-in-blocks(SYS$SYSTEM:SYS$ERRLOG.DMP)
    = number-of-error-log-buffers * blocks-per-buffer
    + 2

where:

number-of-error-log-buffers | Is the value of the system parameter ERRORLOGBUFFERS. This parameter sets the number of error log buffers that are permanently allocated in memory.
blocks-per-buffer | Is the value of the system parameter ERLBUFFERPAGES. This parameter sets the number of pagelets (blocks) of memory in each buffer.

On VAX Systems

On VAX systems, the size of the error log dump file depends on your DOSD:

- Without DOSD, error logs are written to the dump file SYSDUMP.DMP on the system disk. See Section 16.4.1 for sizing information.
- With DOSD:
  - Both error logs and system memory are written to the SYSDUMP.DMP file on the DOSD disk. See Section 16.4.1 for sizing information.
  - In addition, error logs are written to the stub system dump file SYSDUMP.DMP on the system disk. Because this is a fixed-length file of 2048 blocks, no sizing calculations are required.

### 16.4.3 Calculating Page File Size

Sufficient page file space is critical to system performance. The AUTOGEN command procedure calculates an appropriate size for your page file space. The size calculated by AUTOGEN should be sufficient. However, to manually calculate the size for page file space, use one of the following formulas.

On VAX Systems

On VAX systems, use the following formula:

    size-in-blocks (total for all page files on the system)
    = size-of-average-process (in pages)
    * maximum-number-of-processes

- The size-of-average-process is the value of the average virtual size of the process. Use the following command to find it:

      $ SHOW PROCESS/CONTINUOUS/ID=pid

  Specify this value in pages.
- The maximum-number-of-processes is the value of the MAXPROCESSCNT system parameter.

If the result of the formula is less than VIRTUALPAGECNT, use the value of VIRTUALPAGECNT instead.

To determine a system's virtual page count, enter the following command:

    $ WRITE SYS$OUTPUT F$GETSYI ("VIRTUALPAGECNT")

On Alpha Systems

On Alpha systems, no simple formula can be given because of the wide variation possible in memory size and usage. You can use the following formula for systems up to 512MB:

    size-in-blocks (total for all page files on the system)
    = size-of-average-process (in pages)
    * blocks-per-page
    * maximum-number-of-processes

- The size-of-average-process is the value of the average virtual size of the process. Use the following command to find it:

      $ SHOW PROCESS/CONTINUOUS/ID=pid

  Specify this value in pages.
- Calculate blocks-per-page by dividing the system page size by 512 (pagelet size). For example, a system with a page size of 8192 has 16 pagelets per page.
  To determine a system's page size, enter the following command:

      $ WRITE SYS$OUTPUT F$GETSYI ("PAGE_SIZE")

- The maximum-number-of-processes is the value of the MAXPROCESSCNT system parameter.

For systems over 512MB, follow the steps described below for monitoring page file usage ( Section 16.4.3.2), and make adjustments as necessary.

#### 16.4.3.1 Representing Page File Size

The page file size you calculate can be represented in one of the following ways:

- In the primary page file only
- Distributed across primary and secondary page files
- If you have removed the primary page file in SYS$SYSTEM, distributed across a number of secondary page files

#### 16.4.3.2 Monitoring Page File Usage

Once you determine an initial size for your page file or files (either with AUTOGEN or manually), monitor page file usage by executing AUTOGEN with the following command:

    $ @SYS$UPDATE:AUTOGEN SAVPARAMS TESTFILES FEEDBACK

With this command, AUTOGEN writes page file usage and size recommendations to the feedback report AGEN$PARAMS.REPORT. (For more information about AUTOGEN and the feedback report, see Section 15.4 and Section 15.4.2.) The DCL command SHOW MEMORY/FILES also displays file usage, as explained in Section 16.3.

Keep page file usage less than half the size of the page file or files. If a paging file starts to fill to the point where system performance is being affected, a message is printed on the console terminal. If this happens, increase the size of your page file or files or install additional files.

Note Your system resources and work load affect the required size of your page file. You should be familiar with your system resources and work load. For more information, refer to the OpenVMS Performance Management.

#### 16.4.3.3 Limiting Page File Space

Limit the amount of page file space consumed by user programs by using the /PGFLQUOTA qualifier of the AUTHORIZE commands ADD and MODIFY. (Refer to the AUTHORIZE section in the OpenVMS System Management Utilities Reference Manual for more information.) Do not reduce the value of /PGFLQUOTA below 1024. Size requirements of the page file vary widely, depending on user applications.

### 16.4.4 Calculating Swap File Size

Sufficient swap file space is critical to system performance. The AUTOGEN command procedure calculates an appropriate size for your swap file space. To manually calculate the size for swap file space, use the following formula:

    size-in-blocks (total for all swap files on the system)
    = maximum-number-of-processes
    * average-working-set-quota-of-processes-on-system

where:

maximum-number-of-processes | Is the value of the MAXPROCESSCNT system parameter.
average-working-set-quota-of-processes-on-system | Is the average value of the WSQUOTA limit for processes running on the system. On VAX systems, specify the value in pages. On Alpha systems, specify the value in pagelets.

#### 16.4.4.1 Representing Swap File Size

The size you calculate can be represented in any of the following ways:

- In the primary swap file only
- Distributed across primary and secondary swap files
- If you have removed the primary swap file in SYS$SYSTEM, distributed across a number of secondary swap files

#### 16.4.4.2 Monitoring Swap File Usage

Once you have determined an appropriate size for swap file space (either manually or with AUTOGEN), monitor swap file usage with the DCL command SHOW MEMORY/FILES as explained in Section 16.3. Keep at least one-third of the swap file space unused; otherwise, system performance can be severely affected.

Note Your system resources and work load affect the required size of your swap file. You should be familiar with your system resources and work load. For more information, refer to the OpenVMS Performance Management.

## 16.5 Minimizing System Dump File Size When Disk Space Is Insufficient

In certain system configurations, it might be impossible to preserve the entire contents of memory in a disk file. For instance, a large memory system might not be able to supply enough disk space for a full memory dump. If your system attempts to save all of memory but the dump file is too small to accommodate the entire dump, the System Dump Analyzer utility (SDA) might not be able to analyze the dump.

On VAX systems, insufficient dump space would also prevent the Crash Log Utility Extractor (CLUE) from being able to analyze the dump.

Options for Minimizing System Dump File Size

Use one of the following options to minimize the size of the system dump file when disk space is insufficient:

- Selective dumps
  To preserve those portions of memory that contain information most useful in determining the causes of system failures, you can use selective system dumps. Table 16-1 defines physical and selective dumps.
  Table 16-3 compares the information available in physical and selective system dump files.

  Table 16-3 Comparison of Physical and Selective System Dump Files
  Type | Available Information | Unavailable Information
  --- | --- | ---
  Physical dump (also known as full dump) | Complete contents of physical memory in use, stored in order of increasing physical address and error log buffers. | Contents of paged-out memory at the time of the crash.
  Selective dump | System page table, global page table, system space memory, error log buffers, and process and control regions (plus global pages) for all saved processes. | Contents of paged-out memory at the time of the crash, process and control regions of unsaved processes, and memory not mapped by a page table.

  To direct your system to save selective system dumps, set bit 0 of the system parameter DUMPSTYLE. System parameters and their values are in an appendix of the OpenVMS System Management Utilities Reference Manual. For information about how to change system parameter values, see Section 15.5.
- Compressed dumps
  On Alpha systems, if you set bit 3 of the DUMPSTYLE system parameter, OpenVMS writes the physical or selective system dump in a compressed format. (The exact amount of the compression depends on system use, but the typical compressed dump is about 60 percent of its original size.) If you use compressed dumps, AUTOGEN sizes the system dump file at 2/3 of its uncompressed size.
- Dump off system disk (DOSD)
  If you set bit 2 of the DUMPSTYLE system parameter and meet all the other requirements, OpenVMS writes the system dump to a disk other than the system disk. For details, see Section 16.7.

Section 16.5.1 discusses the order in which information is written to a selective system dump on Alpha and VAX systems. Section 16.5.2 discusses how this order can be fine-tuned on Alpha systems.

### 16.5.1 Understanding the Order of Information in a Selective System Dump

The following lists show the order in which information is written to selective dumps on VAX and Alpha systems.

On VAX systems, information is written to selective dumps in the following order:

1. System page table (SPT)
2. System space (including process page tables, page frame number (PFN) database, and global page table (GPT))
3. Global pages that appear in the working set of any process
4. Processes resident at the time of the crash:
   1. Current process on crash CPU
   2. Predefined processes (hardcoded into BUGCHECK)
   3. Current processes on other CPUs
   4. Other processes resident at the time of the crash, in order by process index

On Alpha systems, information is written to selective system dumps in the following order:

1. Page table (PT) space for shared addresses (S0/S1/S2)
2. S0/S1 space
3. S2 space
4. Key processes:
   1. Current process on crash CPU
   2. Swapper
   3. Current processes on other CPUs
   4. Site-specific priority processes (see next section)
   5. Compaq-defined priority processes (hardcoded into BUGCHECK):

      > MSCPmount
      > AUDIT_SERVER
      > NETACP
      > NET$ACP
      > REMACP
      > LES$ACP

5. Any processes in a resource or miscellaneous wait state (for example, RWAST)
6. Key global pages (those that appear in the working set of any key process)
7. Other processes (the non-key processes) resident at the time of the crash, in order by process index
8. Remaining global pages that appear in the working set of any non-key process

Note that on Alpha systems, processes are dumped in two stages: the page tables for the process first, and then the body of the process.

Usage Notes on VAX and Alpha Systems

On both VAX and Alpha platforms, no process is dumped twice. For example, on Alpha systems, if the current process is the Swapper, it is dumped only once.

Similarly, on Alpha systems, no global page is dumped twice. Therefore, if a page in the working set of a key process is dumped in the "Key global pages" section, it is not dumped again later just because it is also in the working set of a non-key process.

### 16.5.2 Fine-Tuning the Order That Processes Are Written in Selective System Dumps (Alpha Only)

On Alpha systems, a set of processes, known as key processes, are dumped immediately following PT, S0/S1, and S2, including transition pages that link back to the process. The system manager can designate additional processes to be treated as key processes. These processes have priority over other processes in a dump, thus ensuring that the selected processes are successfully written when the dump file is too small to contain all processes.

How to Perform This Task

To designate the order of processes in a dump, follow these steps:

1. Copy the file SYS$SYSTEM:SYS$DUMP_PRIORITY.TEMPLATE to SYS$SYSTEM:SYS$DUMP_PRIORITY.DAT.
2. Following the instructions in the file, edit the .DAT file to contain a list of the processes to be dumped early in the dump.
3. Run the image SYS$SYSTEM:SYS$SET_DUMP_PRIORITY.EXE. Note that the image is automatically run during system startup if the data file SYS$SYSTEM:SYS$DUMP_PRIORITY.DAT exists.

You can edit the data file and run the image at any time the system is running. Therefore, if a process is hung, the system manager can designate the process as a priority process and then force a crash.

Previous | Next | Contents | Index

| privacy and legal statement |
6017PRO_071.HTML