Professional Documents
Culture Documents
SAP Memory Management (An Overview)
SAP Memory Management (An Overview)
Memory management fundamental : The word memory virtual memory physical main memory + swap space local memory + shared memory
The maximum amount of virtual memory that can be allocated is limited by two variable :
- Result of physical hardware restriction - Maximum address space permited by operating system The Operating System manages two type of memory : -Local memory allocated precisely to one operating system process -Shared memory accessible to multiple operating system process
User Context Reffered : Data which is generated by transaction process Variables, Internal table & screen list New sesion = new user context Data is stored independently in different memory areas Stored in SAP roll memory, SAP extended memory, & SAP Heap Memory Sesions divide into : External sesion opened explicitly by user Internal sesion Opened implicitly by program submit, call transaction, call dialog, call screen, call function in update task, call function in background task, and call function starting new task.
Process Flow
Pres. server
DB Server
SAP GUI
Database buffer
Dispatcher Queue
dispatcher
SAP Roll Memory Local SAP Roll area of work process - The initial part of user context stored - Each SAP work process can only access its own roll area Shared SAP Roll Area - Accessible to all of instance work processes - Buffer to temporary keep user context when a user is assigned to new work process - Roll in : copying user context from shared roll area to local roll area
- Roll Out : copying user context from local roll area to shared roll area
Work Process1
ztta/roll_first
Roll Buffer (shared) Roll (local) Roll In / Roll Out Roll file
rdisp/roll_SHM
ztta/roll_area
rdisp/roll_MAXFS
SAP Roll area parameters - ztta/roll_first - ztta/roll_area - rdisp/ROLL_SHM - rdisp/ROLL_MAXFS : First amount of roll area used in a dialog WP : size of the local SAP Roll area in the work process : size of SAP roll Buffer : size of entire shared SAP roll area
SAP Extended Memory Shared memory which mostly of user context stored All SAP work process can edit stored user context directly Roll in rather only copied the address (pointer) of where a user context located on the SAP extended memory. makes roll process much faster
em/initial_size_MB
ztta/roll_extension
SAP Extended Memory main parameters : em/initial_size_MB : size of SAP extended memory allocated when the SAP instance starts up em/blocksize_KB : size block which split SAP Extended Memory ztta/roll_extension : maximum size of a user context in the SAP Extended memory
SAP Heap Memory Area which allocated variably as local memory as required. Released after a transaction is complete. SAP Heap Memory main parameters : abap/heap_area_dia : quotas oh SAP heap memory that a dialog process can allocated.
abap/heap_area_nondia : quotas oh SAP heap memory that a nondialog process can allocated. abap/heap_area_total abap/heaplimit : size that can be allocated in total by all work process. : Workprocess restart limit of heap memory abap/heap_area_(non)dia abap/heap_area_total
UserIndependent Data
- Data stays in work process - No context switch possible - Work process in private mode
UserIndependent Data
Mapping the data during context change - Data stays in work process - No context switch possible - Work process in private mode
SAP EG Memory and SAP Paging Memory Data can be stored globally between user context SAP Extended Global Memory Used to store data across user context Allows fast & copy-free switching based on mapping. Substracted from SAP Extended Memory to calculate the remaining storage space configured using em/global_area_MB parameters
SAP Paging Memory Object that stored in the SAP Paging Memory : ABAP data cluster stored temporarily with ABAP statement
IMPORT/EXPORT FROM/TO MEMORY
Data extracts created by statement EXTRACT (up to basis 4.5) SAP Paging Memory Main Parameters : rdisp/PG_MAXFS : Size of SAP Paging Memory rdisp/PG_SHM : Size of SAP Paging Buffer (shared memory)
Local memory
Additional local heap memory (if required)
Local memory
Local memory
Local memory
1:n
SAP Roll File SAP Paging File Work Process Work Process
1:1
Work Process
Configuring & Monitoring SAP Memory Areas Main Objective : Performance Stability
Main Factors to be considered : Physical Main Memory (RAM) Swap space or paging file of the operating system Operating system restriction
Next points to be considered : Total Main Memory Requirement Number of Computer Several SAP instances per computer SAP extended memory and roll buffer Memory for SAP work process Database Instance
em/initial_size_MB User Independent WP Local SAP Buffers (Shared) Roll Memory (Shared) User Context SAP Extended Memory (Shared)
abap/heap_area_(non_)dia
Address Space
SAP Work Process
em/address_space_MB User Independent WP Local SAP Buffers (Shared) Roll Memory (Shared) User Context SAP Extended Memory (Shared)
abap/heap_area_(non_)dia
Address Space
SAP Work Process
Assistance With Troubleshooting Error because of incorect memory area configuration : Operating System can not start because the operating system cannot provide the requsted memory area Session terminations User is logged off ABAP Program termination. Four error factors : Program errors (e.g endless loop) SAP Profile parameters are set incorectly The Swap Space on the operating system is not large enough Configuration parameters of the operating system are set incorectly or OS limits have been reached.
- End of Presentation -