Powered By

Free XML Skins for Blogger

Powered by Blogger

Friday, January 9, 2009

Allocating R/3 Memory for User Contexts

Use

The memory management system assigns memory to the user contexts from the following 3 areas: Roll area, R/3 Extended Memory and heap memory.

The order of assignment from these memory areas arranges itself according to whether the user context runs in an R/3 dialog work process or in another R/3 work process. This enables the R/3 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

R/3 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 R/3 System.

1. For technical reasons, the roll area provides the first 100 to 250 KB (depending on the operating system) that is required for the user context. Additional memory for this initial allocation is sets according to the system profile parameter ztta/roll_first. (If ztta/roll_first is set to 1 MB for example, approximately 1.2 MB roll area is provided.)

2. If the memory from the roll area is not sufficient for the user context, more memory is provided from the R/3 Extended Memory. Extended Memory remains available for the user context as long as:

The work process reaches the limit of the R/3 Extended Memory for work processes. This limit is set in the system profile parameter ztta/roll_extension.

The R/3 Extended Memory is used up. The size of the extended memory pool is set in the system profile parameter em/initial_size_MB.

3. 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).

4. 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:

R/3 limits: 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 R/3 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:

R/3 limits: 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 R/3 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 should never occur.)

3. If no more heap private memory can be allocated, a non-dialog work process can use the R/3 Extended Memory.

This only valid under UNIX. Under Windows NT, the memory is distributed for non-dialog processes the same as for dialog work processes. This is described more explicitly under Implementation on Windows NT.

No comments:

Archives