Allocating Memory for User Contexts (UNIX)

Use

The memory management system assigns memory to user contexts from the following areas: roll area, SAP extended memory, and heap memory.

The order of assignment from these memory areas arranges itself according to whether the user context runs in an SAP dialog work process or in another SAP work process. This enables the SAP system to optimally use the characteristics of the individual memory types.

When allocating memory, the following characteristics for individual memory types become noticeable.

Memory type

Characteristics

SAP Roll Area

Sequential memory allocation to several work processes using a relatively slow copying process

SAP Extended Memory

Sequential memory allocation to several work processes using a fast allocation process Uses swap space

Private memory

Allocation to a local work process, as required for the running user context in the process Uses swap space

Flow

The flow depends on whether it is a dialog work process or not. Unlike other work process types, dialog work processes require frequent context changes. Private memory that is linked to a work process is only assigned if there are no other options.

Allocating Memory for Dialog Work Processes

The following graphic shows how the memory management system assigns memory to a dialog work process with different memory types. Normally, dialog work processes process requests from dialog users of the SAP system.

  1. For technical reasons, the roll area provides the first 100 to 250 KB (depending on the operating system) for the user context. Additional memory for this initial assignment sets itself according to the system profile parameter ztta/roll_first. If, for example, ztta/roll_first is set to 1000000(1 MB), approximately 1.2 MB roll area is provided. If ztta/roll_first is set to 1, only the technically necessary amount is allocated to roll memory.)
  2. If the memory from the roll area is not sufficient for the user context, more memory is provided from the SAP Extended Memory. Extended memory is available for the user context until one of the following conditions is satisfied:
    • The work process has reached the limit of the SAP Extended Memory for work processes. This limit is set in the system profile parameter ztta/roll_extension.
    • The SAP Extended Memory is used up. The size of the extended memory pool is set in the system profile parameter em/initial_size_MB.
  1. If this memory is also insufficient for the user context, more memory is provided from the roll area until this area is completely used up, or until the limit set in ztta/roll_area is reached. The roll memory now available sets itself according to the difference between the 2 parameter values ztta/roll_area (total memory in the roll area) and ztta/roll_first (size of assigned roll memory in step 1).
  2. If the user context still requires additional memory, it is assigned heap memory (Private Memory). Heap memory is available until one of the following situations occurs:
    • SAP restrictions: Either the limit of the heap memory for dialog work processes is reached (defined in the system profile parameter abap/heap_area_dia), or the entire heap memory of all work processes for an SAP application server reaches its limits (defined in parameter abap/heap_area_total).
    • Operating system limits for allocating memory
    • The swap space in the host system is used up or the upper limit of the operating system address space (as determined by the 32-bit architecture) is reached. Try to avoid these situations at all times. To avoid this situation, you must set parameter abap/heap_area_total correctly.

Allocating Memory for Other Work Processes

The following graphic shows how the memory management system assigns memory to non-dialog work process (background, update, lock and spool work processes) with different memory types.

  1. The memory is taken from the roll area until the area is used up. The maximum size of the roll area is set in the system profile parameter ztta/roll_area.
  2. If the roll area is full, heap memory is allocated to the work process. Heap memory is available until one of the following situations occurs:
    • SAP restrictions: Either the limit of the heap memory for non-dialog work processes is reached (defined in the system profile parameter abap/heap_area_nondia), or the entire heap memory of all work processes for an SAP application server reaches its limits (defined in parameter abap/heap_area_total).
    • Operating system limits for allocating memory
    • The swap space in the host system is used up. This situation should never occur (see Swap Space Requirements).
  1. If no more private heap memory can be allocated, a non-dialog work process can use the SAP extended memory.