Pages

Tuesday 4 February 2014

User's Memory Usage

SM04®choosing Goto ® Memory

Roll®The roll area holds the user environment information needed by work processes when executing dialog steps.

Page®SAP Paging is only used for a limited number of ABAP commands.

Mem(sum)®Specifies how much of the SAP extended memory was requested by this user.

Mem(Private )®Private memory (heap memory) requested by the user.


Roll Area

Definition
The roll area is a memory area with a set (configurable) size that belongs to a work process. It is located in the heap of the virtual address space of the work process.
Use
When the context of a work process changes, the data is copied from the roll area to a common resource called the roll file. To prevent repeated copying, another roll buffer is located in between that is part of the shared memory.
Structure
The roll area consists of 2 segments. The first segment, which can be set with the parameter ztta/roll_first, is assigned to the work process first as memory. If this is used up, the work process has more memory assigned to it. The amount of memory is determined by the difference between the parameters ztta/roll_area and ztta/roll_first.

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

SAP Pagging-
Allocation of memory for the current internal session by transferring pages out of memory, similarly to operating system paging.
SAP Paging enables the roll area to be extended at ABAP runtime when a large dataset, internal tables, for example, is handled.
SAP's memory management concept currently limits SAP Paging to cases where the ABAP commands EXTRACT and EXPORT... TO MEMORY... are used.

Extended Memory 

Definition
SAP extended memory is the core of the SAP memory management system. Each SAP work process has a part reserved in its virtual address space for extended memory. You can set the size of extended memory using the profile parameter em/initial_size_MB: Extended Memory Pool Size
Use
You can map the extended memory from the common resource onto any work process, and after onto another process on the same address in the virtual address space. This is important if you work with pointers in the ABAP program.
NOTE- Sequential memory allocation to several work processes using a fast allocation process Uses swap space
Private Memory
Definition
Other processes cannot use private (heap) memory. After releasing the assigned memory, the operating system still considers the (virtual) memory as being occupied by the allocating process. These characteristics of heap memory require that:
  1. The work process can be run in PRIV mode (private) when the local memory is assigned. This means that the work process is reserved for processing the current user context until the context releases the work process again when the request has ended.
  2. The work process, if it has used a lot of private memory, is restarted when the user context is terminated and the local memory is returned. The restart makes the local memory available again for other processes. A restart occurs if a work process uses more local memory than is defined in the parameter abap/heaplimit. The mechanism is displayed again there.


Use
If a dialog work process has used up the roll area assigned to it and the extended memory, private memory is assigned to the work process. The work process goes into PRIV mode (private).
In the parameter settings, ensure that not too many dialog work processes are simultaneously in the PRIV mode, since this lowers system performance.
The other Work Process types (background, update, enqueue and spool work processes) are assigned heap memory after the roll area is used up. Allocating Extended Memory is not useful since no context change occurs for these processes.
Integration
Automatic Termination of PRIV Mode Processes
If too many dialog work processes run in the PRIV mode in an SAP application server, performance problems arise.
The SAP System offers a mechanism that lets you terminate non-active dialog processes in the PRIV mode. This mechanism helps reduce performance problems.
The mechanism works as follows:
In the PRIV mode, a maximum number (n) of dialog work processes can run without any time restrictions.
To determine this number n, set the value of the profile parameter rdisp/wppriv_max_no. If a value is not entered, the SAP System determines this number using the following formula:
the number (n) is set to the greater of the 2 following values:
  • Number of dialog work processes minus 5
  • 1
If more than (n) dialog work processes are active and the time span set in parameter rdisp/max_priv_time (default 600 seconds) has elapsed, the transaction for that PRIV process, which has spent the longest possible time in PRIV mode, is reset.
You have configured 10 dialog work processes on one SAP instance. The parameters rdisp/wppriv_max_no and rdisp/max_priv_time are not changed (default settings).
Then, the SAP System checks periodically if more than 5 dialog work processes are in PRIV mode after 600 seconds (10 minutes). If this is the case, the transaction is reset that has been in PRIV mode for the longest time. A corresponding dialog box appears to the user.

If performance problems arise, you can change these parameters, but do this only after consulting with SAP.
Non-dialog work processes (background, update, etc.) are not contained in this mechanism and are also not considered
NOTE- Allocation to a local work process, as required for the running user context in the process Uses swap space

Flow

No comments:

Post a Comment