TOCPREVNEXTINDEX

Lund Performance Solutions


The PAGES Tool
The PAGES tool allows users to see how memory on their MPE/iX computer is really being used. To achieve this, PAGES offers many commands that allow the user substantial flexibility in requesting memory usage information.

Operation

PAGES looks at every page of physical memory (i.e.: RAM memory) and keeps track of how each page is used. After PAGES scans completely through every page of physical memory, it reports a summary of page usage.
The user has many choices for requesting memory information from PAGES. Memory statistics can be gathered on a number of criteria such as object class, dirty, Recoverable Overlay Candidate (ROC), In Motion In (IMI), and frozen memory.
Other options allow for complete characterization of all available memory, or brief summaries of usage based on user and system demands. PAGES also has an option that shows the advantages realized by adding memory to your HP3000.
To obtain its information, PAGES analyzes each entry in the Physical Page Directory (PDIR). Because of the rather specific nature of this tool, several special sections have been included that cover technical concepts and terminology that may make using PAGES more meaningful. These sections will follow the Usage section.

NOTE Based on system use, memory demands and usage can change radically. Drawing conclusions from a single session with PAGES would undermine the objective of analyzing system performance. We recommend that you conduct several PAGES sessions over a period of time to ensure that the information is truly representative of the resource usage at your site.

Capabilities

Program capabilities required include IA, BA, PM, DS and PH. No special user capabilities are required to run PAGES.

Usage

PAGES can be run from the supplied UDC or from a fully-qualified RUN statement.
  • UDC
  • PAGES
  • RUN
  • RUN PAGES.PUB.LPSTOOLS
    PAGES does not use any INFO parameters. When executed, PAGES displays a report on:
  • which series HP3000 is running,
  • the operating system version, and
  • how much memory there is.
  • Memory

    This section will provide background information that may enhance your understanding of how PAGES operates and how to use the information that it generates.

    Physical and Logical Memory

    Physical memory on the MPE/iX machine is organized in pages, where each page contains exactly 4,096 bytes. (On older PA-RISC hardware where the physical page size is 2,048 bytes, MPE always allocates a pair of physical pages at a time, so the logical page size is still 4,096 bytes). Memory is used for many purposes and is always allocated in whole pages, although it is never allocated until it is needed. Another phrase often used to describe memory is "logical page". A logical page is two adjacent physical pages. Each logical page begins with an even numbered physical page.
    Most tools that deal with pages in memory use 4,096 bytes as a page size. This is properly called the "logical page" size.

    Virtual Memory

    Virtual memory on the MPE/iX machine can be thought of as a set of virtual address spaces, with each space measuring 232 bytes (4 gigabytes) in length. Virtual spaces are identified by a space identifier. Virtual addresses are formed by linking the space identifier and the offset within a virtual address space.

    Virtual Addresses

    Each virtual address space (232 bytes) is divided into 2,048 byte pages or a single physical page size. Unique addressing of any page in a virtual address space requires 21 bits (232 bytes divided by 2,048 bytes). By the same token, uniquely addressing any byte within a page would require a total of 11 bits (2048=211).

    Translation Lookaside Buffer

    Transforming the virtual address into a physical page of memory is handled by the "Translation Lookaside Buffer" (TLB). The TLB hardware accepts a virtual address as input. The virtual page number portion of the virtual address is used as an index into the TLB’s table. If an entry exists at that location, then mapping occurs and a 21-bit physical page number is issued. This physical page number is then linked with the 11-bit page offset portion of the original virtual address to give the full 32-bit physical page address.
    The TLB hardware is not large enough to contain all translations. If an entry is not found, a memory structure known as the "Physical Page Directory" (PDIR) is accessed to get the translation information. The PDIR is large enough to contain all translations. The process of accessing the PDIR to get the required translation is known as "TLB handling", or "TLB miss handling". This condition is generally known as a page fault.

    PID

    A Protection Identifier is a 15-bit number that is assigned to a page for security purposes. When page access is attempted, the PID is matching against a PID list in a control register. If no match is made, access is denied. PID=Zero means no checking is done. The file system verifies that the PID is loaded before access is possible.

    Memory Objects

    Memory usage on the MPE/iX can be divided into two general categories: system and user. Within these two categories memory can be used for many different tasks. These tasks are grouped by logical functionality into "Object Classes", or by kind into "Object Types".

    Object Classes

    Every page of virtual memory has an associated "object class", a value in the range 0..800 (also known as "magic number"). Each object class has a particular meaning. For example, object class 8 means "Native Mode System Library" (i.e., NL.PUB.SYS). Thus, the object class is a method of classifying objects (like sex, religion, or skin color is used to classify humans).
    Object class is often abbreviated "objclass".

    Object Types

    PAGES organizes object classes into 8 different types based on use:
    SYSTEM_CODE
    SYSTEM_DATA
    TURBO_DATA
    USER_CODE
    USER_DATA
    USER_STACK
    USER_FILE
    UNUSED
    These Type declarations are generally used to classify memory use.

    Glossary of Terms

    This will provide information on the terms used in this program that will enhance your understanding of how to use the information that PAGES generates.

    DIRTY

    Refers to those physical pages that have been written to but not yet posted to disk.

    REFERENCED

    Refers to those physical pages that have been referenced (read or write) "recently". The memory manager periodically resets the referenced bits.

    UNUSED

    Refers to those physical pages that are currently in an unused state.

    FROZEN

    Refers to a specific type of page state. When a page is frozen, it will not be swapped out using the normal demand paging algorithm.

    INUSE

    Refers to the normal state for physical pages that have been allocated to a process.

    IMI (In Motion In)

    Refers to a page of physical pages that is assigned to a virtual page, where the virtual page is in the process of being transferred from memory to disk.

    PRESENT

    Refers to a page of physical memory that is assigned to a virtual page, where the virtual page is "present" and available for access.

    ROC (Recoverable Overlay Candidate)

    Refers to a page of physical memory that is assigned to a virtual page, where the virtual page is marked as "not present". If a ROC page is accessed, a hardware trap occurs. The operating system marks the page as present, and re-starts the instructions. Physical pages marked as ROC are picked up by the memory manager when it is searching for a physical page to use in handling a page fault for some virtual page.

    ABSENT

    Refers to a page of physical memory not currently assigned to hold a virtual page.

    Object Class By Type

    DATA_CLASS

    The DATA_CLASS contains object classes associated with user’s data. This includes:
    CM_DATA
    CM_USER_DATA

    NOTE Object classes associated with stacks and heaps are classified as USER_CLASS.

    FILE_CLASS

    The FILE_CLASS contains object classes associated with mapped files (excluding TurboIMAGE files).

    SYSTEM_CLASS

    The SYSTEM_CLASS contains every object class not contained in any of the other classes. These object classes are typically data/code used by the operating system, not directly by the user.

    TURBO_CLASS

    The TURBO_CLASS consists of (roughly) the object classes:
    TURBO_GLOBAL_CB
    TURBO_BUFFER_CB
    TURBO_USER_CB
    TURBO_REMOTE_CB
    TURBO_DSCB_EXT
    TURBO_SYS_CB
    TURBO_ILR_CB
    TURBO_MAIN_CB
    TURBO_ABORT_CB
    TURBO_ROOT
    TURBO_DATA_SET
    TURBO_DATA_BASE_ACCESS
    TURBO_DBABORT_I
    TURBO_ILR_LOG
    TURBO_DBRECOV_RESTART
    TURBO_DBCHANGE_FILE
    The exact classification is controlled by the appropriate PAGES##.DATA file.

    UNUSED_CLASS

    The UNUSED_CLASS has no object classes associated with it. Instead, when PAGES finds an unused page in memory, it considers it to be part of the unused class.

    USER_CLASS

    The USER_CLASS consists of the object classes that seem to be associated with "user" oriented data or code...
    NM_STACK
    CM_STACK
    NM_CODE
    CM_CODE
    NM_HEAP
    CM_USER_CODE
    NM_PROGRAM
    CM_PROGRAM

    NOTE Pages belonging to the stack or heap of system processes are counted as part of the USER_CLASS, because PAGES cannot determine whose stack/heap pages are in memory.

    Command Summary

    The following list provides a summary description of PAGES commands, which can be used to quickly locate the command that suits the task at hand. Detailed information on each command is provided in the next section.

    NOTE Portions of the command codes are printed in uppercase to denote the part of the command that PAGES requires in order to distinguish one command from another. However, the commands themselves are not case-sensitive.


    Table 13.1 PAGES Commands
    Command Code
    Description
    Exit
    Terminates PAGES
    FIND <what>
    Search for specified virtual address or pages
    FRozen #
    Search for frozen count
    HELP
    Displays more help information
    HPDIR
    Walks the page table
    IPDIR
    Displays summary info for memory manager
    MMG
    Doesn’t work on 6.5
    PREFetch
    (experimental)
    Objclass #
    Search for specified Object Class
    PROCesses
    Report memory usage by process (PIN)
    RAMUSage
    Report affect of adding memory
    SCan
    Scans through memory (long report)
    SET/RESET
    Sets/Resets various options
    SR6SR7
    Reports SR6/SR7 space usage
    Status
    Reports memory status (short report)
    /
    Terminates PAGES
    ?
    Synonym for HELP

    NOTE Commands may be abbreviated to the uppercase portion.

    Command Definitions

    This section discusses each of the PAGES commands in detail. At the end of this section is information on each of the option that can be used with the [RE]SET command.

    Exit

    The Exit command (synonym: /) terminates PAGES.

    FIND

    The FIND command has the following syntax:
    FIND [ <address> | ALL | SID spaceid# | SPACEid spaceid# ]
    [options]
    where:
    <address> ::= offset | space.offset
    options ::=
    [ABSent]
    [DIRTy]
    [DISK]
    [FROZen [#1 [/#2]]]
    [IMI]
    [INUSEonly]
    [LAUNCH #1 [/#2]] (MPE/iX 5.0 and later)
    [LPAGEs #1 [/#2]]
    [NOTINUSEONLY]
    [OBJclass #1 [/#2]]
    [PIDs #1 [/#2]]
    [PINs #1 [/#2]]
    [PRESent]
    [REFerenced]
    [RESident]
    [ROC]
    [UNUSED]
    The FIND command looks at every page of physical memory, searching for pages that match your specifications. The meaning of each option is explained below.
    Specifying more than one option usually results in a page having to meet all of the options. The exception is the options IMI, PRESent, and ROC. If page meets any of those four specified options AND all other options, then it is displayed. For example: most options are "and"ed together; the IMI, PREsent, and ROC options are "or"ed together.
    <address>
    If a virtual address was specified, only those pages that match that address will be reported.

    NOTE Sometimes, several logical pages appear to be associated with the same virtual address. PAGES cannot distinguish between these to determine which (if any) is currently "active".



    Figure 13.1 FIND Command
    The FIND command displays the following header line when it starts to search for logical pages matching specified characteristics:
    Page$ VirtSpace.VrtOffset RIVDB $PID MN Fr Sta PIN Ob# Object Class Name
    Each of the fields in the heading is explained below:

    Page$
    The logical page number. (Remember, a logical page is 4,096 bytes.)
    VirtSpace
    The virtual space identifier. (Upper 32 bits of a virtual address.)
    VrtOffset
    The virtual offset. (Lower 32 bits of a virtual address.)
    R
    Referenced Bit. This bit is turned on when a page is referenced.
    I
    (unknown)
    V
    (unknown)
    D
    Dirty Bit. This bit is set on when a page is stored into.
    B
    Data Breakpoint bit. This bit is on when a page has a data breakpoint on it. Data breakpoints are setup with DEBUG's DATAB command.
    $PID
    Protection ID. This 15-bit value represents the "lockword" for a page.
    M
    Memory-Resident. When this bit is turned on, the page is "locked" permanently into memory.
    N
    (unknown)
    Fr
    Frozen counter. When this value is non-zero, the page is temporarily frozen into memory.
    Sta
    Page State. The values for this field are PRESENT, IMI, ROC, and ABSENT. Each is explained in the glossary.
    PIN
    Process Identification Number of process that cause the page to be brought into memory.
    NOTE 1 The process may have terminated, and the PIN could have been re-used. PAGES cannot determine if that has happened.
    NOTE 2 This field can be suppressed by doing RESET PIN, or enabled by doing SET PIN.
    Ob#
    Object Class Number. (See also Object Class Name). If a SET OBJNUM has been done, then this field appears.
    Object Class Name
    Every "object" (a range of virtual addresses) created by MPE/iX has a magic number associated with it called the "object class". This number can be used to help determine how many pages of disc storage should be fetched when a page fault occurs. The Object Class Name field is the "English" name for the Object Class Number.

    ALL (default)
    FIND ALL tells PAGES to look at all logical pages, not just those associated with a particular virtual address or virtual space.


    Figure 13.2 FIND ALL option
    SPACE # (or SID #)
    The SPACE option tells PAGES to look only for logical pages that are used to hold virtual pages belonging to the specified space ID.
    Example: FIND SPACE $3a6
    Most of the rest of the FIND options restrict the set of pages that will be reported:
    ABSent
    Restricts the FIND command to just those logical pages that are in the "Absent" state. Normally, few pages are in this state.
    NOTE It is unclear if the various fields describing a page are in a valid state for absent pages!
    Example: FIND ABSENT (will find pages that are absent)
    DIRTy
    Restricts the FIND command to just those logical pages that have been written to and not yet posted to disc.
    Example: FIND DIRTY
    FROZen [ #1 [/#2] ]
    Restricts the FIND command to just those logical pages whose frozen count is in the range specified. (If /#2 is omitted, #2 is set to #1, which will seach for just that frozen count.)
    If #1 is also not given, #1/#2 defaults to 1/255.
    Example 1: FIND FROZEN 3 (similar to FROZEN 3 command)
    Example 2: FIND FROZEN 3/9
    IMI
    Restricts the FIND command to just those logical pages that are in the "In Motion In" state.
    IMI, PRESent, and ROC are "OR"ed together.
    Example: FIND IMI
    INUSEonly
    Restricts the FIND command to just those logical pages that appear to be "in use" by MPE/ iX. MPE reserves some pages in low memory for special purposes (i.e., for use by the MEMSAVE utility used by the DUMP process), and PAGES normally ignores these pages.
    INUSEonly is on by default, and can be turned off by specifying NOTINUSEONLY or UNUSED.
    LAUNCH #1 [/#2]] (MPE/iX 5.0 and later)
    Restricts the FIND command to just those logical pages in the whose "launch counter" is in the specified range.
    LPAGE #1 [/#2]
    Restricts the FIND command to just those logical pages in the range #1 to #2. (If /#2 is omitted, #2 is set to #1, which will "find" at most one logical page.)
    Example 1: FIND LPAGE 90
    Example 2: FIND LPAGE 0/20
    NOTINUSEONLY
    Tells FIND that all pages should be examined, not just those marked "in use" (see INUSEonly above).
    OBJclass #1 [/#2]
    Restricts the FIND command to just those logical pages whose object class is in the range specified. (If /#2 is omitted, #2 is set to #1, which will search for just that object class.)
    Example 1: FIND OBJCLASS 200 (similar to OBJCLASS 200 command)
    Example 2: FIND OBJCLASS 200/209
    PID #1 [/#2]
    Restricts the FIND command to just those logical pages whose protection ID (PID) is in the range specified. (If /#2 is omitted, #2 is set to #1, which will search for just that PID.)
    Example 1: FIND PID 34
    Example 2: FIND PID 34/90
    PIN #1 [/#2]
    Restricts the FIND command to just those logical pages which were brought into memory on behalf of processes in the specified PIN range. (If /#2 is omitted, #2 is set to #1, which will search for just that PIN.)
    Example 1: FIND PIN 10
    Example 2: FIND PIN 10/12
    PRESent
    Restricts the FIND command to just those logical pages that are in the "PRESent" state.
    IMI, PRESent, and ROC are "OR"ed together.
    Example: FIND PRESENT